SQL Queries - Assignment - 3

 Assignment 3

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


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 three features here. [1]. WHERE Clause  [2]. Like Keyword and [3]. Operators in SQL

  1. Select (Display) all the flats belonging to 'A' Block.
  2. Select (Display) all the 3rd floor flats
  3. Select (Display) all the active users
  4. Select (Display) all the residents whose names start with English letter 'a' or 'A'
  5. Select (Display) all the residents whose names end with English letter 'a' or 'A'
  6. Select (Display) all the residents whose names second character English letter 'a' or 'A'
  7. Select (Display) all the residents whose names third character English letter 'i'
  8. Select (Display) all the residents whose names contain the word 'kumar'
  9. Select (Display) all the residents whose names  First character is 'a' and second character can be anything in [m,j]
  10. Select (Display) all the residents whose names first character is 'a' but the second character is neither 'm' nor 'j' (but can be anything else)
  11. select (Display) all the residents who have got gmail ID
  12. Select (Display) all the residents who are tenants.
  13. Select (Display) all the residents who belong to block "A"
  14. Select (Display) all the residents whose birthday falls between January 1 1963 to December 31 2022.
  15. Select (Display) all the maids who are no more working in the apartment society
  16. Select (Display) all the male maids in the society 
  17. Select (Display) all the maids who does baby sitting.
  18. Select (Display) the comments of all maids having ratings more than 3.
  19. Select (Display) all the flates which are more than 1100 square feet.
  20. Select (Display) all the flates of block "A" and "D"

Comments