I'm having to hack a report together to pull data from another field in the same table. The row selection is going to be based on various elements in the above 'foreignkey' field - elements 1, 2, 4 & ...
It is a SQL practice repository covering basics to advanced topics. It includes exercises on SELECT statements, WHERE clauses, GROUP BY, JOINS, window functions (OVER(), PARTITION BY), ROW_NUMBER(), ...