O'Reilly logo

Microsoft SQL Server 2012 T-SQL by Debra Aaron, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5 – Aggregation

“SQL Server climbed Aggregate Mountain and delivered a better way to Sum It.”

– Tera-Tom Coffing

Quiz – You calculate the Answer Set in your own Mind

image

SELECT Avg(Grade_Pt)     AS "AVG"

,Count(Grade_Pt)  AS "Count"

,Count(*) AS "Count *"

FROM  Student_Table

WHEREClass_Code IS NULL

AVG    Count  Count *  

What would the result set be from the above query? The next slide shows answers!

Answer – You calculate the Answer Set in your own Mind

image

SELECTAvg(Grade_Pt)     AS "AVG"

,Count(Grade_Pt)  AS "Count"

,Count(*)AS "Count *" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required