Explain the cube operator?



Explain the cube operator?..

Answer / Abhishek Swaroop

The CUBE operator in SQL creates a cross product of all possible groupings of columns in a query's result set, including all single-column groupings. It is similar to the GROUP BY operator but generates more rows by aggregating data across multiple dimensions. The resulting table has one row for each unique combination of grouped values.nnFor example:n```sqlnSELECT department, job_title, COUNT(*) FROM employees GROUP BY CUBE (department, job_title);```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Development Interview Questions

How would you design a database for an online site, which would average a million hits a day?

1 Answers  


What are the three types of database design?

1 Answers  


There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?

1 Answers  


What is dbms explain in brief?

1 Answers  


What are the constraints on severity level in raiseerror?

1 Answers  


Who are end users in dbms?

1 Answers  


what is difference between primary key and unique key ?

2 Answers  


Explain about the hierarchical model of the database?

1 Answers  


What is a database development?

1 Answers  


Explain about query and reporting.

1 Answers  


Explain what a database is?

1 Answers  


How to use online Backups?

1 Answers  


Categories