Databases
Bug Report
Top-N report silently dropped tied rows: ROW_NUMBER vs RANK vs DENSE_RANK
Our monthly 'top 3 sellers per region' bonus report left out a sales rep who tied for third, and a rerun picked the other one. ROW_NUMBER breaks ties arbitrarily. We show how to pick RANK, DENSE_RANK or WITH TIES on purpose.