PTC Interview Question

DSA,Oops(Mostly in Java) Some SQL Queries Puzzles