Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 : Consider the following database schema. For to - go orders, tableNo and emplID are NULL. For to - go orders and current

Part 1: Consider the following database schema. For to-go orders, tableNo
and emplID are NULL. For to-go orders and current orders, tip is NULL.
MenuItem(itemName, price)
Order(orderNo, tableNo, time, date, emplID, tip)
Server(emplID, emplName)
MenuItemOrder(itemName, orderNo, quantity)
HoursWorked(emplID, date, hours)
1. Write the following mySQL queries:
a) Give the total price of order 56.
b) For each server who has fallen short of making $5.00 per hour worked
in tips today, report the employee ID and the shortfall amount.
c) Remove the lobster bisque from table 3s current order.
d) Reassign all of Adam Bakers current orders to Charles Dugue.
e) For each order, list the employee ID and tip. Output the results by
employee ID increasing then tip decreasing.
2. Describe the output table for the following query:
SELECT COUNT(*)
FROM Order
WHERE tableNo IS NULL AND date = CURDATE();

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

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

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago