Thomson Reuters interview question

MySQL questions and one query