Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(data types: i Inteoar on the followin.. - OrderDetails (O_ID) is FK and refers to Customers (C_ID). - OrderDetails (O_ID) is FK and refers to
(data types: i Inteoar on the followin.. - OrderDetails (O_ID) is FK and refers to Customers (C_ID). - OrderDetails (O_ID) is FK and refers to Orders (O_ID). 1. (25P) Write the necoductID) is FK and refers to Products (P_ID). 2. Write the necessary SQL statements for: a. (5P) All products with a price less than 5 TL should be listed. b. (5P) All products with unit prices between 10TL20TL should be listed. c. (5P) All customers having first name starting with an "E" should be listed. d. (5P) All of the first name and last name combinations should be listed. Every combination must occur in the list just once. e. (5P) All dates should be listed on which there are more than 20 orders per day. f. (5P) The order with the OID=2 should be displayed with the corresponding item names and quantities. g. (5P) For each order, the total price should be calculated and displayed in a descending order. h. (5P) Calculated and list the first names, last names of the customers, and money they have spent. i. (5P) All item prices in the Products table should be reduced by 10%. 3. (5P) A new customer with your information should be added to the Customers table. k. (5P) The maximum unit price of the products should be listed. 1. (5P) The best-selling item (item name and the sales quantity) should be displayed. (5P) A view should be created where all customers are listed with their city names
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started