Tools › PIVOT blueprint
Dynamic PIVOT table T-SQL blueprint
PIVOT is easy to forget. This writes the static version and a dynamic skeleton that reads distinct values.
Dynamic SQL is powerful and easy to get wrong. Parameterise. Do not concatenate user text into the IN list without quoting.
Learn it on a real ticket
Monday is free on WorkSQL. Write the T-SQL yourself. We mark it like a colleague would.
Clock in free