MAQ Software interview question

SQL