Quotient interview question

mainly sql nd data structure