Multiple Counts in One Query

PHOTO EMBED

Wed Dec 27 2023 17:31:54 GMT+0000 (Coordinated Universal Time)

Saved by @darshcode #sql

Instead of reading the table twice, we only need to read it once and can return one set of results. This query also has the same 30046 logical reads.

PIVOT 

Learn how to use Pivot to do this
content_copyCOPY

https://callihandata.com/2022/05/02/multiple-counts-in-one-query/