SQL FOR BUSINESS ANALYSTS · REFERENCE CARD
SQL for BAs: window functions and ranking
Rank rows inside groups, pick the top row per group, and decide in advance how ties are treated, using ROW_NUMBER, RANK and DENSE_RANK.
Derived from SQL for BAs: window functions and ranking. Every claim on this card is sourced on that page. All business analysis reference cards.