TetraSoft interview question

Reg : SQL queries and java basics