Novartis Interview Question

Writing an SQL query on the spot