UBS interview question

Sql query optimization, data flow etc