WITH ROLLUP
を使用します
GROUP BY
への修飾子 :
SELECT IFNULL(env, 'Unknown'),
COUNT(*) AS Count
FROM env_table
GROUP BY env WITH ROLLUP
ORDER BY env
WITH ROLLUP
を使用します
GROUP BY
への修飾子 :
SELECT IFNULL(env, 'Unknown'),
COUNT(*) AS Count
FROM env_table
GROUP BY env WITH ROLLUP
ORDER BY env