Yalantis interview question

Questions about Db queries, best practices etc