Qualcomm Interview Question

Complex joining queries using sql.