Harsco interview question

sql is must for this