Pergunta de entrevista da empresa toothsi

the hackerearth coding test had 3 questions of easy-medium difficulty in video call, the interviewer asked question on SQL