Question d’entretien chez Fetch

I was given a problem on SQL with a sample dataset and asked to write a pseudo code.