Problem 1 — DDL (CREATE + CONSTRAINTS)
Create a table named Products with the following structure:
product_id – integer, primary key
product_name – varchar(50), cannot be null
price – integer, must be greater than 0
stock – integer, default value 0
Problem 2 — DDL (ALTER + DROP)
Perform the following operations on the Customers table:
1. Add a new column email of type varchar(100)
2. Remove the column age from the table
Problem 3 — DML (INSERT + UPDATE)
Using the Orders table:
1. Insert a new order with:
o order_id = 6
o item = 'Webcam'
o amount = 1500
o customer_id = 2
2. Increase the amount of all orders by 10% where the item is
'Keyboard'.
Problem 4 — DML (DELETE + TRUNCATE)
Perform the following operations:
1. Delete all customers who belong to the country 'UAE'.
2. Remove all records from the Shippings table without deleting its
structure.
Problem 5 — DQL (SELECT with filtering & sorting)
Write a query to display:
first_name, country, and age
Only customers whose age is greater than 23
Sort the result in descending order of age