Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

data beas Final lab exam Database Instruction: please Copy your answers to a word file and upload the document to the exams, finollob then submi

data beas image text in transcribed
image text in transcribed
Final lab exam Database Instruction: please Copy your answers to a word file and upload the document to the exams, finollob then submi your work. Please copv vour 5Q L statement as a text to a word file ond not as screen shot. Questions: write Sar statements to answer the following questions Az Zulfi public iibrary woula like to creote o dotabose that stores informotion obout its customers. books and bought book orders that captures the following information: - the datobase will store information about customers such as ClD, nome, and phone number - Books are identified by their (BID, titie, price) - The customers can buy books from the library 1. Create the database using SQL stotements 2. Create the tables of the databose (. 5 Mark) 3. Insert the following informotion to the datobose ( 5 Mark) Books: (1125, 'databose', 70), (1564, CS; 60), (253, 'Programming , 65) Customers: (2464', 'Monsor;, 0505154675),('2627:' Kholed', 050854675),(6557; Ahmed 059875567) Orders table (18: '2464', 2553),('9; '2627; 1125),(785;; 6557; 1564) 4. Updote the price of the Book with id 2564 ta be 62 . (1 Mork) 5. Write a query to get unique books from book table. ( 1 Mark) 5. Write a query to get unaque books from book kable. (2Mark) 6. Write a query to get all customers details from the customers table order bun agme ospending: 1 Mark) 7. Write a query to get the Book, price, and price ofter tax of all the books (price ofter ta: calculated as 15% of price). (1 Mark) 8. Write a query to get the minimum book price: (1 Mark) 9. Write a query to find the phone number of the customers whose name is 'mansan': (1) 10. Wrtite a query to find customers who purchased the dotabase book. (1 Mark) 11. Wrtite a query to find customers who purchased a book that cost more than 62 . 11 Mat 12. Fix the errors in the following code to find how much did monspr purchased his book fo: Marks shaw c.name, title, price from customers c, books x, recipts o if cosid !=b,cid Q.Bidd=v.cidc.ome>podssorgrbupcise=dotabose

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