Exama Paper
Exama Paper
2. DDL: Create the `Order` table with columns `order_id` (Primary Key),
`order_date`, `amount`, and `customer_id` (Foreign Key referencing
`Customer`).
3. DML: Write a query to insert a 5 customer into the `Customer` table and
5 orders into the `Order` table
7. JOIN: Write a query to retrieve all customers from the `Customer` table
along with their orders. If a customer has no orders, display `NULL` for the
order details using a left join.
8. Subquery: Write a query to find customers who have not placed any
orders by checking for customers not in the `Order` table.
9. Subquery: Write a query to retrieve order_id and amount for orders that
have an amount greater than the overall average order amount.