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 with AI-Powered 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

Students also viewed these Databases questions