One would think something should be possible with ROLLUP: https://dev.mysql.com/doc/refman/5.7/en/group-by-modifiers.html
Unfortunately I have no mysqld instance handy. It was not hard to do with postgres' GROUPING SETS (but it turned out to be slightly slower than choroba's UNION-approach above).
In reply to Re: How to add columns with new row name using perl from mysql query?
by erix
in thread How to add columns with new row name using perl from mysql query?
by perlanswers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |