Subject grouping with an "as" field
Author lartz001
if i have something like:

select distinct(fielda),count(*) as amount from table group by fielda
order by amount desc;

this does not work

but:

select distinct(fielda),count(*) as amount from table group by fielda
order by count(*) desc;
does

how would i order by the "as" defined field?