Hi there,
I'm using LLBLGen Pro 1.0.2005 with adapter scenario.
how can I sort to count(myField)?
My select statement in simplified form (there are some joins, but I got that all working)
select a, b, c from myTable
group by a,b,c
order by count(a) desc
I guess it would be simpler if i rewrote it to this, but i want to know if its possible to do it withouth adding count(a) to the select list.
select a, b, c, count(a) as d from myTable
group by a,b,c
order by d desc
So the question is: How to order by an aggregate field, where the aggregate of this field is not in the select list.