Servian interview question

-SQL query, join, grouping, aggragetion 2 algorithm questions