SQL Queries - Assignment-5

 Assignment - 5

-------------------------

Write SQL Queries for the following (based on the above data). You can use SQL Server Management Studio to run your queries:

Hint/Note : You will be using the features here IN, BETWEEN & TOP 

  1. Select (Display) all the floor details for the ground , first and second floor
  2. Select (Display) all the floor details except for the ground , first and second floor
  3. Select (Display) all the floor details having area in square feet between 1000 to 1300
  4. Select (Display) all the floor details having area in square feet NOT between 1000 to 1300
  5. Select (Display) all the residents details who were born between 1970 to 1980
  6. Select (Display) top 1 residents details 
  7. Select (Display) top 50%  residents details 
  8.  Select (Display) top 2 residents who resides in block 'A'
  9.  Select (Display) all residents whose name starts from letter 'A' - 'P'
  10. Select (Display) all users whose credentials created between January 2021 to December 2022 
  11. Select (Display) how many residents are owners and tenants
  12. Select (Display) the maids having average ratings more than 3
  13. Diplay the blocks having number of residents more than 10
  14. Diplay all the female maid details who can do baby sitting.
  15. Diplay the maidID and Number Of Flats She/He has worked for those maids who have worked for more than 2 flats

Comments