I would like to use GROUP BY CUBE with some columns. I have tried this way (which I found from many website) but I get the error
Error in SQL statement: UnsupportedOperationException:
Here is the query:
SELECT a, b, c, SUM(d) AS d
FROM table
GROUP BY a, CUBE(b, c)
I'm not sure if I did something wrong or you can suggest other way.
Thanks in advance.
I separate 'a' outside cube because I don't want to have null (total) in 'a' column as I think it will help to reduce the time as well.