UBS interview question

Database joins