I am trying to implement OLAP queries in MySql.
Here is a relation that I am trying to implement queries on
Cart(product_name,shipper_name,quantity).
I tried running the following query:
select product_name,shipper_name, sum(quantity) from Cart group by CUBE(product_name,shipper_name);
The above query results in the following error when executed:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CUBE(product_name,shipper_name)' at line 1
I am using MySql community version 8.0.
I was expecting a relation in output that performs the group by operation according to the cube operation that we have in SQL.