using the where and order by clauses in sql