Question d’entretien chez Amazon

How would you optimise this sql query?