Dazeworks interview question

sql sql sql sql sql