Pergunta de entrevista da empresa Smoothstack

Asked to come up with an SQL query given a few table attributes