Acosta Group interview question

Sql coding basic Hackerrank stuff