"Find the second highest X per group" appears in interviews because it tests whether you understand window functions versus simple aggregates. MAX() alone gives you the highest. To get the second, you need ranking.
The pattern: rank rows within each group by the column of interest using DENSE_RANK() OVER (PARTITION BY group ORDER BY column DESC), then filter to rank = 2. DENSE_RANK handles ties cleanly — two people tied for first both get rank 1, and the next person is rank 2.