One of the best features in SQL are window functions. Dimitri Fontaine put it bluntly: There was SQL before window functions and SQL after window functions If you're lucky enough to be using any of these databases, then you can use window functions yourself: CUBRIDDB2FirebirdH2InformixMariaDBMySQLOraclePostgreSQLSQLiteSQL ServerSybase SQL AnywhereTeradata (source here) One of the most obvious … Continue reading The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK()