Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These queries use the Chicago Food Establishment Inspections database as shown in the figure below. Chicago Food Establishment Inspections is a government regulatory entity that

These queries use the Chicago Food Establishment Inspections database as shown in the figure below. Chicago
Food Establishment Inspections is a government regulatory entity that inspects food establishments to verify that
they are meeting all the food regulations that have been established by the city. The structure of the database is
simple in order to facilitate understanding and writing of solution queries. Be sure that you understand the
database structure before attempting to write the SQL queries.
The database consists of five tables: Establishment, Employee, Inspection, Violation, and Inspection_Point. The key
symbol indicates which attribute is the key field for the table. The relationship lines indicate foreign keys.
, Each Establishment has multiple inspections. Each Inspection is for one Establishment.
, Each Employee has one Supervisor. Each Supervisor manages multiple Employees.
, Each Employee does multiple Inspections. Each Inspection is done by one Employee.
, Each Inspection can have multiple Violations. Each Violation occurs on one Inspection.
An Inspection can cause a single Follow-up Inspection.
, Each Inspection_Point can apply to multiple Violations. Each Violation is for one Inspection_Point.
For each information request below, formulate a single SQL query to produce the required information. In each
case, you should display only the columns requested. Be sure that your queries do not produce duplicate records
unless otherwise directed. In some cases, there are several queries that may be correct, but the problem definition
may specify a particular approach. In that case, be sure you write the query exactly as specified.
Who (first name and last name) is the employee with a phone number of (773)253-8766?
List the point_id and Description for all Inspection Points in the category of Food Protection.
List all of the inspections done by employees with ids of 173558 or 171336. Show inspection ID, Date, and Type.
What is the monthly salary for each employee that is a Supervisor? List first name, last name, and monthly salary.
Label the answer column as Monthly_Salary.
Make a list of violations that violated inspection point number 5. Only include in your answer the inspection id, the
amount of the fine, and the inspector comment.
Provide a list of the inspection point categories for food establishments. (Avoid duplicates.)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions