sql query not meeting conditions

Printable View