SQL Queries - Assignment-4
Assignment 4
--------------------------
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. [1]. AND, OR , SQL Functions
- Select (Display) all the residents who were born before 1970.
- Select (Display) all the flats belonging to block 'A' and area in square feet is less than 1300
- Select (Display) all residents who resides either in Block A or her/his names starts with 'A' ( No JOIN required)
- Select (Display) all residents who born between 1960 and 1970
- Select (Display) all residents who are not of block 'A'
- Select (Display) all flats belonging to block 'A' and not ground floor
- Select (Display) all residents whose phone number starts with 9 and having gmail account
- Select (Display) all the flat details which are more than 1200 sqft but less than 1350 sqft
- Select (Display) all the flats on second floor but not in block 'B'
- Select (Display) all the active users created in the year 2022
- Display all the employees whose name contains the word 'Kumar'
- Display the eployee name , dob and age form residents table. The age should be calculated based on DOB and today's date
- Display all the residents who are 30 years old today
- Display all the resident whose birthday falls in April
- How many maids are there who work in block 'A'
- How many residents there belonging to block 'A'
- Display what is the average area in square feed of the flats in Block 'B'
- How many flats are there which measure between 1000 to 1200 SQFT.
- Find the average age of residents living in the society
- Display the list of maids who can do 'baby sitting'
Comments
Post a Comment