S&P Global Interview Question

sql joins, a puzzle, inheritance