Lesson 4 of 6 in this module

19/33 in track

Pivoting and unpivoting

sql12 min

Locked lessonAdvanced Querying

Pivoting and unpivoting

PIVOT turns row values into columns. SUM(CASE WHEN ...) is the portable pivot pattern.