Contents:
MySQL的查询计数非常简单,通过 COUNT ... GROUP BY 可以对指定字段进行计数,为了方便排序, COUNT 字段应该有一个 alias :
COUNT ... GROUP BY
COUNT
alias
select alert,count(*) as num from notifier_alert_statistics group by alert order by num DESC;
Ordering by specific field value first