Pregunta de entrevista de Amazon

Basic-average difficulty LeetCode SQL question