Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Al Salman shopping site stores information about customers, suppliers, products, orders, and deliveries. The information about the customer is kept in the customer rimellom Suppliers'

image text in transcribed

Al Salman shopping site stores information about customers, suppliers, products, orders, and deliveries. The information about the customer is kept in the customer rimellom Suppliers' relation contains details about the suppliers of the products. Product relation contains the details about the products. Orders relation contains the details of orders. The details of each order are kept in the order-product relation. The details about the deliveries are kept in the deliveries relation. The details of the products in each delivery are kept in delivery-products relation. The relations are given below: customer (customer_id, customer_name, gender, date_of_birth, customer_phone, customer_address) supplier (supplier_id, supplier_name, supplier_email, supplier_phone, supplier_address) product (product_code product_name, product_price, product_description) order (order_code, order_date, order_status, order_details, supplier_id) order_product (order_code, product_code, quantity) deliveries (delivery_id, delivery_date, delivery_status, delivery_details, customer_id) deliveries_products (delivery_id, product_code quantity) a. b. C. Use the above relations and write SQL statements for the following questions: - Explain the working of each query in your own words. List all the details of male customers. (3 marks) Display order code and the supplier name of orders whose order date is before 31-12-2021. (5 marks) List each supplier id and the total number of orders for that supplier. Exclude the orders ended before 01-11-2021. (5 marks) d. Display the customer id and the total number of deliveries of the customer. Sort the results in the descending order of the number of deliveries. (5 marks) Display the product code and the sum of quantity in each product code from deliveries_products table. Include only the product codes if the sum of quantity is greater than 100. (6 marks) f. Display the order code, product name, product price and quantity. (6 marks) 9 Increase the price of product with product code 'P980' to 1%. (6 marks) Remove the customer with id 'C009'. (4 marks) e h

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_2

Step: 3

blur-text-image_3

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

Question

Thank you! The correct state diagram for the shown circuit is

Answered: 1 week ago