grouping sets

External Article

Summarizing Data Using the GROUPING SETS Operator

  • Article

Writing aggregate queries is one of the most important tasks for anyone working with T-SQL. Determining the expressions required in the GROUP BY clause is not that difficult, but what do you do if you need to include different combinations of group by expressions in the same result set? Alfonso demonstrates how to use the GROUPING SETS operator to accomplish this task.

2017-12-18

4,860 reads

Stairway to T-SQL DML

Stairway to T-SQL DML Level 8: Using the ROLLUP, CUBE and GROUPING SET operator in a GROUP BY Clause

  • Stairway Step

In this article I will be expanding on my discussion of the GROUP BY clause by exploring the ROLLUP, CUBE and GROUPING SETS operators. These additional GROUP BY operators make it is easy to have SQL Server create subtotals, grand totals, a superset of subtotals, as well as multiple aggregate groupings in a single SELECT statement.

You rated this post out of 5. Change rating

2012-08-22

17,161 reads

Technical Article

All the Aggregates you crave with Grouping Sets in SQL Server 2008

  • Article

As reporting requirements increase, it seems that aggregate functionalities have thankfully risen to the occasion concurrently. To maintain its competitive edge as Staples Canada’s best vendor, BaldGorilla, where I’m currently consulting, has been able...

You rated this post out of 5. Change rating

2009-02-05

2,050 reads

Technical Article

RE: Executing bcp from within stored proc causes locking/blocking

  • Reply

Doug, Am going to pull the query out and see what I can do about indexes. Prestatie table contains about 700.000 records and joins to PrestatieHistoriek which contains about 900.000 records and growing at about 100.000 a month (2 months in production now). What worries me a bit is that the procedure executes reasonably fast […]

You rated this post out of 5. Change rating

2005-04-08

Blogs

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers