Question: Top O ' the Morning ( TOM ) is a company that provides custom stone countertops for kitchens, bathrooms, and other areas of a home
Top the Morning TOM is a company that provides custom stone countertops for kitchens, bathrooms, and other areas of a home or business. The company is providing you access to sample data for a small area of their overall database. Read the brief description below to help you understand the data. The data were captured in
TOM ERD
Explanation of the data model:
The EMPLOYEE table contains a portion of the data kept on employees that work for TOM doing installation of purchased products. The employees are organized into crews each day that they work. A crew is typically comprised of a leader and one or more assistants. The leader is responsible for the quality of the installation work done by the crew that day. Employees are not always part of the same crew crews change from day to day. The TRUCK table contains some of the data about the box trucks that crews use to deliver products to the installation site. The stone countertops are very heavy usually each so care must be taken to ensure the weight capacity of the trucks is not exceeded. Each day a truck can be assigned to deliver multiple products and the group of employees that are in a crew that day. The truck usually has multiple products loaded each assigned day. The products may be destined for one job site or multiple job sites. The crew drives the truckload of products to the site and installs the products that were ordered for that job site. Each product is a stone countertop. The product has a description to help the crew distinguish between the products on their truck. The weight of the product and how many minutes the crew is estimated to need to install the product is also recorded. There is also a description of the installation location for each product so the crew can be assured of putting each product in the correct location within the building. The SITE table has data about the job sites where products are to be installed, and who to contact about any issues with accessing the site,
Page of
Among the factors that impact Installation time are the weight of the product and the complexity of the sink alignment. TOM is interested in improving installation estimates. Write a query to display the product number, product description, installation minutes, installation minutes per pound of the product, the contact person for the site where the product is installed, the contact phone number, the date it was installed, and the employee that was the leader of the crew installing the product. Include products that have not been delivered and installed yet. Limit the results to:
Kitchen products with a hole sink with installation time above minutes
Any product with a hole sink with installation time below minutes.
Sort the results by minutes per pound in descending order, then by product number in ascending order.
Result rows:
tablePRODNUM,PRODDESCRIPT,PRODINSTALLMINUTES,MINUTES POUND,SITECONTACT,SITEPHONE,ASSIGNDATE,CREW LEADKitchen island with hole sink,Ed Walker,Dianne HermannKitchen Cabinet top hole sink and hole sink,Bria Rowden,NULL,Kitchen Cabinet top with hole sink,Raquel Aviel,Sam JonesKitchen top for hole sink,Ed Walker,Dianne Hermann hole sink bathroom vanity top,Russ Smith,NULL,Kitchen Cabine: top with hole sink,Jameison Jones,Sam Jones
Write a SQL query to answer Q
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
