S&P Global Interview Question

Sql basic query, puzzles, data structures