Question d’entretien chez Copeland

How to get the following output using SQL commands