Quantiphi interview question

mainly on sql and all