Add tests for order by, AS and where clause