CriticalRiver interview question

They asked on SQL Querys questions