Saturday, August 07, 2010

A SQL Tidbit: Conditional Aggregates

As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time!

By the end of my Experts-Exchange Article, A SQL Tidbit: Conditional Aggregates, it is my intention to bring the meaning and value of the above quote to those who chose to read this whether as a beginning SQL programmer or an intermediate one inexperienced with this little tidbit of SQL syntax: conditional aggregation.

Conditional aggregation is simply the use of aggregates under one or more conditions, thus, potentially altering your results of functions like SUM(), COUNT(), etcetera in a particular column while allowing you to analyze your record set as a whole...