postgresql的sql语句排序,指定特定行(比如 ‘合计’行 )在首行(then 99999)或尾行(then -1),
其他行降序(
else user_count end desc;)
SELECT app_name, user_count, flow_usage, active_2_month
FROM t_mgsp_app_flow_month
WHERE statis_day={statis_mon}
order by case when app_name='合计' then -1 else user_count end desc;