Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 : For every property, list the management office number, address, monthly rent, owner number, owner s first name, and owner s last name.

Task
1
: For every property, list the management office number, address, monthly rent, owner number, owner
s first name, and owner
s last name.
Task
2
: For every completed or open service request, list the property ID
,
description, and status.
Task
3
: For every service request for janitorial work, list the property ID
,
management office number, address, estimated hours, spent hours, owner number, and owner
s last name.
Task
4
: List the first and last names of all owners who own a two
-
bedroom property. Use the IN operator in your query.
Task
5
: Repeat Task
4
,
but this time use the EXISTS operator in your query.
Task
6
: List the property IDs of any pair of properties that have the same number of bedrooms. For example, one pair would be property ID
2
and property ID
6
,
because they both have four bedrooms. The first property ID listed should be the major sort key and named as "PROPERTY
_
ID
_
MAJOR" and the second property ID should be the minor sort key and named as "PROPERTY
_
ID
_
MINOR". Include the number of bedrooms as
"
BDRMS
"
for reference.
Task
7
: List the square footage, owner number, owner last name, and owner first name for each property managed by the StayWell
-
Columbia City office.
Task
8
: Repeat Task
7
,
but this time include only those properties with three bedrooms.
Task
9
: List the office number, address, and monthly rent for properties whose owners live in Washington State or own two
-
bedroom properties.
Task
1
0
: List the office number, address, and monthly rent for properties whose owners live in Washington State and own a two
-
bedroom property.
Task
1
1
: List the office number, address, and monthly rent for properties whose owners live in Washington State but do not own two
-
bedroom properties.
Task
1
2
: Find the service ID and property ID for each service request whose estimated hours are greater than the number of estimated hours of at least one service request on which the category number is
5
.
Task
1
3
: Find the service ID and property ID for each service request whose estimated hours is greater than the number of estimated hours on all service requests on which the category number is
5
.
Task
1
4
: List the address, square footage, owner number, service ID
,
number of estimated hours, and number of spent hours for each service request on which the category number is
4
.
Task
1
5
: Repeat Tasks
1
4
,
but this time be sure each property is included regardless of whether it currently has any service requests for category
4
.
From the textbook, A Guide to SQL
(
sidenote
)
the lists shown in this photo are in order, tried to make space for one photo, hope anyone can see it
,
sorry
)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions