Lesson 9.4 · Pro

Rank, then put the winners side by side

Combine ranking with MAX(CASE) to show first, second and third (or best and worst) in one row.

In this lesson

  1. Rank both ways in one CTE
  2. Pick each winner with MAX(CASE)
  3. Top 3 as columns