TeleTracking interview question

1. SQL from Hacker rank 2. Java - Easy/Medium