p4
Give name of depositors having amount greater than 4000.
➢ SELECT depositor_name FROM depositors WHERE amount > 4000;
-
List the employees having salary less than 22000.
➢ SELECT * FROM employees WHERE salary < 22000; -
List the Sailors having age more than 25.
➢ SELECT * FROM sailors WHERE age > 25; -
List the Boats travelling on 10-oct-98.
➢ SELECT b.boat_name FROM boats b JOIN travels t ON b.boat_id = t.boat_id WHERE
t.travel_date = '1998-10-10'; -
List the Details of boats name Interlake.
➢ SELECT * FROM boats WHERE boat_name = 'Interlake'; -
List the details of the red colored boat.
➢ SELECT * FROM boats WHERE color = 'red'; -
List the details of clients whose city is Mumbai.
➢ SELECT * FROM clients WHERE city = 'Mumbai'; -
List Client name, balance, and City of the clients having balance greater than 1500.
➢ SELECT client_name, due_balance, city FROM clients WHERE due_balance > 1500; -
Describe the details of products having selling price less than 500.
➢ SELECT * FROM products WHERE selling_price < 500; -
List the products for which quantity ordered is less than 120 and cost price is greater
than 250.
➢ SELECT * FROM products WHERE quantity_ordered < 120 AND cost_price > 250; -
Display account details having amount greater 2200.
➢ SELECT * FROM accounts WHERE amount > 2200; -
Display all the customers staying in Nagpur.
➢ SELECT * FROM customers WHERE city = 'Nagpur'; -
Display the names of sailors having rating greater than 7.
➢ SELECT sailor_name FROM sailors WHERE rating > 7; -
Display the orders made in the month of June.
➢ SELECT * FROM orders WHERE EXTRACT(MONTH FROM order_date) = 6; -
List all the accounts created in the month of March.
➢ SELECT * FROM accounts WHERE EXTRACT(MONTH FROM created_date) = 3;