One day, Adam Machanic (Twitter | Blog) had the most brilliant idea of his life to that point: T-SQL Tuesday. (That *may *be a slight exaggeration.) This is “a recurring, revolving blog party”, hosted by a guest blogger on the second Tuesday of each month. We’ve had 15 fantastic parties so far. I am lucky enough to host T-SQL Tuesday #016 on **March, 8, 2011**!

**The Topic: Aggregation**

No, not aggravation (although I’ve used the two interchangably before). I want to hear how you solved business problems with aggregate functions. I want to see your cool T-SQL tricks. How are aggregates used in SSRS, SSAS, or SSIS? What have you learned about aggregate functions?

Let’s SUM(thoughts), COUNT(ways we’ve done things), and set MAX(awesome) on our posts!

Remember: “any post that is related to both SQL Server and the theme is fair game. So feel free to post about SSIS, SSRS, Java integration, or whatever other technologies you’re working with in conjunction with SQL Server. Even if your post includes no T-SQL we still want to see it.”

**The Rules**

The first rule of T-SQL Tuesday is: talk about T-SQL Tuesday!

- Post your blog between 00:00 GMT Tuesday, March 8 and 00:00 GMT Wednesday, March 9. (This is equivalent to 8:00 PM EST Monday, March 7 and 8:00 PM EST Tuesday, March 8.)
- Come back here and leave a comment or a pingback to your post.
- In the body of the blog, you must include the T-SQL Tuesday logo, with a link back to this blog. (Sample HTML:
`<a href:"http://blogs.lessthandot.com/index.php/DataMgmt/DBProgramming/come-one-come-all-to"><img src="/wp-content/uploads/blogs/DataMgmt/olap_1.gif"></a>`

)

**Bonus Points **

- In the post title, include “T-SQL Tuesday #016″.
- Tweet your blog post with the hash tag #tsql2sday.
- Consider hosting in the future, and contact Adam if you’re interested.

I’ll be reading through all the blog posts and posting a round-up. I can’t wait to read your thoughts!

## About the Author

Jes Borland is a Senior SQL Engineer at Concurrency and a Microsoft Data Platform MVP. She holds an AAS - Programmer/Analyst degree and has worked with SQL Server as a developer, report writer, DBA, and consultant. She is a user group founder, a blogger, and a frequent speaker. In her free time, she runs, cycles, and cooks.

## 44 Comments

Here’s my contribution http://tenbulls.co.uk/2011/03/08/t-sql_tuesday_16/

Mine’s up: http://sqlblog.com/blogs/rob_farley/archive/2011/03/07/the-blocking-nature-of-aggregates.aspx

Here we go!

http://michaeljswart.com/2011/03/the-aggregate-function-product/

Here’s mine: Using Aggregate Functions in XML: http://www.sqlsoldier.com/wp/sqlserver/tsqltuesday16usingaggregatefunctionsinxml

Here is my contribution: http://beyondrelational.com/blogs/jacob/archive/2011/03/08/t-sql-tuesday-016-summarizing-data-using-grouping-sets.aspx

Here’s my blog for T-SQL Tuesday

http://www.sqlballs.com/2011/03/t-sql-tuesday-16-aggregation.html

Thanks for hosting, Jes!

http://www.jimmcleod.net/blog/index.php/2011/03/08/can-we-reproduce-columnstore-aggregations-in-sql-2008-t-sql-tuesday-016/

Here’s my T-SQL Tuesday Two cents worth

http://www.lukehayler.com/2011/03/t-sql-tuesday-016-aggregations/

Here is my contribution:

http://blog.sqlauthority.com/2011/03/08/sql-server-difference-between-countdistinct-vs-countall/

Here’s mine, thanks, it was a fun topic!

http://noelmckinney.com/2011/03/t-sql-tuesday-016-aggregation-functions/

I cheated but it is almost midnight

here you go!

http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/t-sql-tuesday-016-count-and-delete-duplicates

Tah-dah!

T-SQL Tuesday #016: Aggregates and Windowing Functions and Ranking! Yum!

http://www.midnightdba.com/Jen/2011/03/t-sql-tuesday-016-aggregates-and-windowing-functions-and-ranking-yum

Mine’s here:

Happy T-SQL Tuesday / Pancake Day!

http://blog.nhaslam.com/2011/03/08/t-sql-tuesday-016-taking-it-to-the-max-tsql2sday/

Mine is there as well T-SQL Tuesday #016 Grouping Market Data With T-SQL

Here you go, Jes: http://mattvelic.com/aggregate-the-80s/

Great topic, Jes! Here’s my pithy contribution:

http://www.bobpusateri.com/archive/2011/03/a-poor-mans-data-warehouse/

Good morning Jes. Thanks for hosting this T-SQL Tuesday and sorry about the scheduling misfire. Thats twice my blog out smarted me Hope to cross paths with you at #sqlsat67.

http://www.sqlmashup.com/t-sql-tuesday-016-aggregate-functions

Here’s mine… http://www.jasonstrate.com/2011/03/aggregating-with-correlated-sub-queries-tsql2sday/

Et voila! CLR functions for Median, Percentile, and Covariance…http://devnambi.com/archive/2011/03/t-sql-tuesday-aggregates/

Seems that trackbacks are not working.

Here my blog post: http://ozamora.com/2011/03/windowed-functions-empowering-analytics-tsql2sday

Thanks

Here’s my entry http://www.sqlfeatherandquill.com/2011/03/08/t-sql-tuesday-016-the-power-of-the-checksum_agg/

Thanks for hosting!

Thanks for hosting, Jes! Here’s my two Craisins’ worth: http://www.douglane.net/2011/03/t-sql-tuesday-016-aggregations-in-reporting-services/

Hi Jes, thanks for the fun topic! Voila:

http://wiki.softartisans.com/pages/viewpage.action?pageId=14712884

Tweeted earlier, but here’s my post. Thanks!

http://gillrowley.wordpress.com/2011/03/08/t-sql-tuesday-16-aggregate-functions-factorials/

Here’s my contribution:

http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/understanding-sql-server-2000-pivot

Hi, This is my simple contribution:

http://leka.com.br/2011/03/08/t-sql-tuesday-016-blocking-processes-tsql2sday/

My entry isn’t nearly as pithy as Bob’s, but here goes:

http://sqlblog.com/blogs/andy_leonard/archive/2011/03/08/t-sql-tuesday-aggregations-in-ssis.aspx

For trackback purposes

http://bit.ly/heke9C

Thanks for hosting.

Trackback link: http://bit.ly/fzKSB6

Thanks, Jes.

Here is my post for T-SQL Tuesday on how Aggregate functions help while analyzing data loaded into a SQL Nexus database:

http://troubleshootingsql.com/2011/03/09/t-sql-tuesday-016-aggregate-functions/

Here’s my entry:

http://bradsruminations.blogspot.com/2011/03/t-sql-tuesday-016-awf-inspiring-queries.html

Thanks for hosting!

–Brad

Wow, quite a crowd! Here’s mine: http://philergia.wordpress.com/2011/03/08/aggregation-getting-totals-and-subtotals-with-rollup-and-cube/

Thanks!

Late to the party, as usual… Here’s mine:

http://thelonedba.wordpress.com/2011/03/08/t-sql-tuesday-16-aggregates-and-average-weekly-backup-sizes/

Hopefully I’ll be better prepared for the next one!

Thanks Jes! Here’s my entry:

http://sqlblog.com/blogs/aaron_bertrand/archive/2011/03/08/t-sql-tuesday-16-this-is-not-the-aggregate-you-re-looking-for.aspx

Here’s mine:

http://codegumbo.com/index.php/2011/03/08/tsql2sday-emulating-a-first-aggregation/

Thanks!

Just about waited to the last minute.

http://kenj.blogspot.com/2011/03/absolute-best.html

Thanks, Jes!

And mine: http://blog.datainspirations.com/2011/03/08/retrieving-aggregate-data/

Tuesday #016: Get DB Sums With Powershell

My contribution: http://leka.com.br/2011/03/08/t-sql-tuesday-016-blocking-processes-tsql2sday/

My contribution is here

Top N Percent per group

Doh, just realised that my scheduled post did not show up here, so here’s he link:

Fun with aggregation

Better late than never hopefully!

I’m late, but here’s mine: http://voiceofthedba.wordpress.com/2011/03/09/t-sql-tuesday-016-aggregation/

Jes, thanks again for hosting and the kind comments.

Welcome First time bounded here on your site, founde on Bing. 00-)