Test select projections and order by clause generation