Question d’entretien chez Management Solutions

How do you query this in SQL? how do you return this type in Java? etc...