Quantiphi Interview Question

mainly on sql and all