Question:
I need to know how to order by the count of the selected field. For example:
Select xxx count(xxx)
from prod-table
order by xxx
I'd like to order/rank field xxx highest to lowest.Answer:
You want to write:
select xxx,count(*)
from prod-table
group by xxx
order by count(*)