They need all the service requests with the category of Plumbing (category number 1) and Heating (category number 2), and the next service date within November 2019.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

SQL-

StayWell’s maintenance team is working on the staffing plan for the month of November 2019 including number of people required in the upcoming month. They need all the service requests with the category of Plumbing (category number 1) and Heating (category number 2), and the next service date within November 2019. You need to collect this information from service requests and send it to the team.

To use BETWEEN condition with dates, do not forget to use the CAST function to convert the values to dates such as CAST('2019-01-01' AS DATE).

SERVICE_ID PROPERTY_ID CATEGORY_NUMBER OFFICE_ID DESCRIPTION
STATUS
EST_HOURS SPENT_HOURS NEXT_SERVICE_DATE
Problem has been confirmed.
The second bedroom upstairs is not
heating up at night.
1
11
2
central heating engineer has been
1
2019-11-01
scheduled.
2
1
4
1
A new strip light is needed for the kitchen. Scheduled
1
2019-10-02
The bathroom door does not close
Service rep has confirmed issue.
6.
1
2019-11-09
properly.
Scheduled to be refitted.
New outlet has been requested for the
first upstairs bedroom. (There is currently
no outlet).
4
1
Scheduled
2019-10-02
New paint job requested for the common
area (lounge).
5
3
2
Оpen
10
NULL
Problem confirmed. Plumber has
4
1
1
Shower is dripping when not in use.
4
2
2019-10-07
been scheduled.
00
4.
Transcribed Image Text:SERVICE_ID PROPERTY_ID CATEGORY_NUMBER OFFICE_ID DESCRIPTION STATUS EST_HOURS SPENT_HOURS NEXT_SERVICE_DATE Problem has been confirmed. The second bedroom upstairs is not heating up at night. 1 11 2 central heating engineer has been 1 2019-11-01 scheduled. 2 1 4 1 A new strip light is needed for the kitchen. Scheduled 1 2019-10-02 The bathroom door does not close Service rep has confirmed issue. 6. 1 2019-11-09 properly. Scheduled to be refitted. New outlet has been requested for the first upstairs bedroom. (There is currently no outlet). 4 1 Scheduled 2019-10-02 New paint job requested for the common area (lounge). 5 3 2 Оpen 10 NULL Problem confirmed. Plumber has 4 1 1 Shower is dripping when not in use. 4 2 2019-10-07 been scheduled. 00 4.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education