In the last few weeks, I have been busy creating a complex report for a client. The output itself is in Excel so he can continue the analysis by slicing and dicing the data even further then what I am providing.
To be able to provide data in an appropriate format, I needed to rely heavily of SQL Pivots. You can find a definition of pivot tables on WikiPedia.
This month article is about some tricks I needed to figure out to render the data.
This article can be read from http://emoreau.com/Entries/Articles/2018/02/SQL-Pivot-Tips-and-Tricks.aspx