Answered step by step
Verified Expert Solution
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 InspectionPoint. 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 Followup Inspection.
Each InspectionPoint can apply to multiple Violations. Each Violation is for one InspectionPoint.
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
List the pointid and Description for all Inspection Points in the category of Food Protection.
List all of the inspections done by employees with ids of or 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 MonthlySalary.
Make a list of violations that violated inspection point number 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started