OneCompiler

p4

120

Give name of depositors having amount greater than 4000.
➢ SELECT depositor_name FROM depositors WHERE amount > 4000;

  1. List the employees having salary less than 22000.
    ➢ SELECT * FROM employees WHERE salary < 22000;

  2. List the Sailors having age more than 25.
    ➢ SELECT * FROM sailors WHERE age > 25;

  3. 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';

  4. List the Details of boats name Interlake.
    ➢ SELECT * FROM boats WHERE boat_name = 'Interlake';

  5. List the details of the red colored boat.
    ➢ SELECT * FROM boats WHERE color = 'red';

  6. List the details of clients whose city is Mumbai.
    ➢ SELECT * FROM clients WHERE city = 'Mumbai';

  7. 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;

  8. Describe the details of products having selling price less than 500.
    ➢ SELECT * FROM products WHERE selling_price < 500;

  9. 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;

  10. Display account details having amount greater 2200.
    ➢ SELECT * FROM accounts WHERE amount > 2200;

  11. Display all the customers staying in Nagpur.
    ➢ SELECT * FROM customers WHERE city = 'Nagpur';

  12. Display the names of sailors having rating greater than 7.
    ➢ SELECT sailor_name FROM sailors WHERE rating > 7;

  13. Display the orders made in the month of June.
    ➢ SELECT * FROM orders WHERE EXTRACT(MONTH FROM order_date) = 6;

  14. List all the accounts created in the month of March.
    ➢ SELECT * FROM accounts WHERE EXTRACT(MONTH FROM created_date) = 3;