PwC Interview Question

on java and sql queries