Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: How to Use GROUP BY with Distinct Aggregates and Derived tables
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 07/31/2007 :  09:09:08  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote

In How to Use GROUP BY, we worked on a simple report request and covered the basics of GROUP
and the issue of duplicate rows caused by JOINs. Today we'll finish
up that report while examining SUM(Distinct), and see just
how crucial derived tables are when summarizing
data from multiple tables.

Read How to Use GROUP BY with Distinct Aggregates and Derived tables

Constraint Violating Yak Guru

282 Posts

Posted - 09/01/2007 :  05:51:35  Show Profile  Reply with Quote
Thanks Jeff for the wonderful article. You not only helped in understanding derived tables but also showed how one should approach writing a query - one step at a time. Eagerly waiting for your next article.
Go to Top of Page

Starting Member

1 Posts

Posted - 12/09/2007 :  17:07:26  Show Profile  Reply with Quote
Thank you very much for this so demonstrative article!

"The virtual primary key of a SELECT with a GROUP BY clause will always be the expressions stated in the GROUP BY."
I've never thought about grouped Resultsets this way. It's so much clearer now. :)
Go to Top of Page

Starting Member

1 Posts

Posted - 09/07/2008 :  11:30:51  Show Profile  Visit mehrandvd's Homepage  Reply with Quote
Wowww, great article... It really helped...
Go to Top of Page

Starting Member

1 Posts

Posted - 02/02/2009 :  01:35:39  Show Profile  Reply with Quote
Wonderful article!!! Clearly demonstrates the concept behind join result sets, GROUP By scenario and derived table usage. This should be the norm/way to explain fundamental concepts.

Thank you so much, Jeff. Hats-off!!

Go to Top of Page

Starting Member

1 Posts

Posted - 10/02/2013 :  11:17:47  Show Profile  Reply with Quote
will a question still be answered here?
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2019 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000