MCSA SQL 2016 70-761: Querying Data with Transact-SQL

Available from Amazon as Kindle eBook or  paperback. I recommend reading the Kindle version in a web browser (Amazons cloud reader) or in the Kindle app. The Kindle eBook version is cheaper than the paperback version, and you can try out the code in SQL Server while you are reading.


Chapter 1 code samples

Chapter 2 code samples

Dynamic PIVOT statement (link)

Chapter 3 code samples