Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Given below are the relational database schemas for Customer, Order, Staff and Cake. Customer (custNo, custName, address, phoneNo) Order (custNo, cakeID, quantity, orderDate,

image text in transcribed

Question 1 Given below are the relational database schemas for Customer, Order, Staff and Cake. Customer (custNo, custName, address, phoneNo) Order (custNo, cakeID, quantity, orderDate, staffNo) Staff (staffNo, staffName, position, phoneNo) Cake (cakeID, cakeName, type, price, quantity, weight) Write the SQL statements to: i) List all cakes with price less than RM150.00 ii) List all orders made on 18th July 2013. iii) Find the total number of cakes with weight less than 2kg. iv) List customer's name and type of cake ordered on 15th August 2013. v) Give 10% discount for every Sponge Cake. vi) List all customers in alphabetical order of customer number. Question 2 CUSTOMER custNo custName 1234 Henry Ford 2345 Noor Alisa 4567 Dora Liew custAdd Lot 31, Malay Street, Putrajaya, Kuala Lumpur. No.18, Harmony Park, Bangi, Selangor. 21, Ming Court, Putrajaya, Kuala Lumpur. seatCode SEAT seatNo CHI MM3 MM4 H3 H4 seatArea Balcony Circle Stalls Front Stalls Front Stalls Disabled Disabled theatre Palace of Culture Tunku Aziz Auditorium Palace of Culture Tunku Aziz Auditorium Tunku Aziz Auditorium BOOKING ticketNo issue Date 079231 13/01/2013 309232 13/01/2013 739228 10/02/2013 744555 12/02/2013 777999 12/02/2013 custNo 1234 1234 4567 4567 2345 seatNo H3 H4 C11 MM3 MM4 seatStatus Confirmed Confirmed Confirmed Confirmed Write the SQL statements to: 1) List all customers that live in Putrajaya. ii) List all bookings made by customer named Henry Ford. iii) Change the date issued from 13th January 2013 to 14th February 2013 for ticket number 309232. iv) List details of seat reserved for Disabled customer. v) Find the total number of tickets for seats that already confirmed by the customer. vi) List the customer's name and seat's number for ticket issued on 12/02/2013

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

=+ (b) Do the same for p = 2.

Answered: 1 week ago