Droom Interview Question

Mysql self join query