Novartis Interview Question

They asked basic to advanced SQL and a lot of riddles.