Comments - SELECT WITH ROLLUP
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
It would be helpfull if the GROUPING() function was available to replace the NULLS
Hello Frits, In absence of that you may use a workaround. Wrap the query in a SELECT COALESCE(Country, 'All Countries'),COALESCE(year,'All Years),COALESCE(genre,'All Genred') FROM (.....) AS T;
Claudio,
That's not much of a workaround, since coalesce is a completely different operation which leads to incorrect results. Specifically, coalesce fails to differentiate between nulls in data and nulls generated by the roll up. Coalesce also cannot be used in a having clause.
MariaDB desperately needs to add the grouping function, as common queries are not possible to write correctly without it.
No issue had been created for this - I've created MDEV-32789 - please vote and or comment if you think the issue will be helpful.