Comments - SELECT WITH ROLLUP

2 years, 1 month ago Claudio Nanni

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;

 
4 months, 2 weeks ago David Hillman

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.

 
4 months, 2 weeks ago Ian Gilfillan

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.

 
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.