147k views
1 vote
When coding a query with two columns in the GROUP BY clause, you can insert a summary row for each major group by coding which operator?

a. ROLLUP
b. HAVING
c. OVER
d. none of the above

1 Answer

2 votes

Final answer:

The ROLLUP operator is used to insert summary rows for each major group when coding a query with a GROUP BY clause containing two columns.

Step-by-step explanation:

When coding a query with two columns in the GROUP BY clause, and you want to insert a summary row for each major group, the operator you would use is a. ROLLUP.

The ROLLUP operator is used in SQL to extend the GROUP BY clause. It provides a way to add multiple levels of subtotals to a result set. When the ROLLUP operator is applied, it creates subtotals that roll up from the most detailed level to a grand total, following a hierarchical group level specified in the GROUP BY clause.

User Neelay Srivastava
by
7.2k points