Domanda di colloquio di IBM

sql question writing a method based on table