Kongsberg Gruppen interview question

Regarding SQL query