cube
function (Databricks SQL)
Creates a multi-dimensional cube using the specified expression columns.
Returns
The function must be the only grouping expression in the GROUP BY clause. See GROUP BY clause (Databricks SQL) for details.