Explain how to use Cube operator to summarize data.
Answer
A Cube operator summarizes data of group by. It helps in determining subtotals and grand totals.
A Cube operator summarizes data of group by. It helps in determining subtotals and grand totals.
Example: This will display a summary of employees with same first name.
Select first_name, last_name, AVG(salary) FROM employee GROUP BY first_name WITH CUBE

0 Comments:
Post a Comment