Newgen Software interview question

Data Structures and SQL queries