Asana interview question

Solve SQL, think about this case