UBS interview question

basic SQL question