Database Management Systems (2130703)

BE | Semester-3   Summer-2018 | 05/23/2018

Q5) (c)

Consider following schema and write SQL for given statements.

  1. Find out the names of all clients.
    Select name from Client_master;
  2. List all the clients who are located in Mumbai.
    Select * from Client_master
    where city='Mumbai';
  3. Delete all salesmen from salesman_master whose salaries are equal to Rs.3500.
    Delete from Salesman_master
    &esp;where salary=3500;
  4. Destroy the table client_master along with data.
    Drop table Client_master;
  5. List the name of all clients having ‘a’ as the second letter in their names.
    Select name
    from Client_master
    where name like '_a%';
  6. Count the number of products having cost price is less than or equal to 500.
    Select count(productno)
    from product_master
    where costprice<=500
    group by (costprice);
  7. Calculate the average, minimum and maximum sell price of product.
    Select avg(sellprice), min(sellprice),max(sellprice)
    from product_master;