Database queries

1. Created SQL queries to the database based on the requirements.