SQL Server cube operator

          

Interview questions

SQL Server cube operator


SQL Server cube operator interview questions

<<Previous  Next>>

Explain how to use Cube operator to summarize data.

SQL Server Cube operator - Nov 20, 2008 at 18:00 PM by Rajmeet Ghai

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.

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


<<Previous  Next>>

Also read

SQL BETWEEN

SQL BETWEEN: The BETWEEN operator is used in a WHERE clause to select a range of data between two values. The values can be numbers, text, or dates..............

SQL IN

The IN operator allows you to specify multiple values in a WHERE clause................

List out the difference between CUBE operator and ROLLUP operator.

CUBE generates a result set that represents aggregates for all combinations of values in the selected columns...........

What are the steps to process a single SELECT statement?

Answer - SQL Server uses the following steps to process a single SELECT statement....

What are the restrictions while creating batches in SQL Server?

Answer - CREATE DEFAULT, CREATE PROCEDURE, CREATE RULE, CREATE TRIGGER, and CREATE VIEW statements....

Explain GO Command.

Answer - GO Command is used to signal the end of a batch.....

What is the significance of NULL value and why should we avoid permitting null values?

Answer - Null means no entry has been made. It implies that the value is either unknown or undefined.....



Write your comment - Share Knowledge and Experience


 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring