Innova Solutions Interview Question

Query on Database, and Logic problems