Novartis interview question

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