SELECT
category,
count( category ) AS category
FROM
dept
GROUP BY
category WITH ROLLUP;
WITH ROLLUP 第一次使用with rollup
group by 分组后 再对所有的数据求和 记录一下
SELECT
category,
count( category ) AS category
FROM
dept
GROUP BY
category WITH ROLLUP;
WITH ROLLUP 第一次使用with rollup
group by 分组后 再对所有的数据求和 记录一下