Assignment 2
Assignment 2
Assignment 2
Create these tables and insert your own 10 records on each table.
Exercise 1: CTE
a. Create a CTE named order_summary that provides a summary of orders. The CTE should
include the following columns: order_id, customer_name, order_date, total_amount, and the
total quantity of items in the order.
b. Create a CTE named product_sales that provides a summary of product sales. The CTE
should include the following columns: product_id, product_name, category, and the total
revenue generated by selling that product.