SELECT * FROM (SELECT country, sum(id) as cnt FROM mygroup GROUP BY country WITH rollup) t ORDER BY cnt;
參考網址: http://www.sqlusa.com/bestpractices2005/subtotaltotalgrandtotal/
文章標籤
全站熱搜
SELECT * FROM (SELECT country, sum(id) as cnt FROM mygroup GROUP BY country WITH rollup) t ORDER BY cnt;
參考網址: http://www.sqlusa.com/bestpractices2005/subtotaltotalgrandtotal/