Pregunta de entrevista de Intuit

average sql, and algorithms, not very original