Pergunta de entrevista da empresa IBM

They asked basic DSA question and One SQL query that I solved using Join.