Scotiabank interview question

How you can resolve multiple queries together?