Database Management Systems-Sql Model
Database Management Systems-Sql Model
A product can be
described with a unique product number, product name, selling price, manufacturer name. The
product can sale to a particular client and each client have it own unique client number, client
name, client addresses, city, pin code, state and total balance to be required to paid. Each client
order to buy product from the salesman. In the order, it has unique sales order number, sales
order date, client number, salesman number (unique), billed whole payment by the party or not
and its delivery date. The salesman have the name, addresses, city, pin code, state, salary of the
sales man, delivery date, total quantity ordered, product rate.
Write the SQL queries for the following –
(a) Retrieve the list of names and the cities of all the clients.
(b) List the various products available.
(c) Find the names of all clients having ‘a’ as the second letter in their names.
(d) List all the clients who are located in TEZPUR.
(e) Find the products whose selling price is greater than 2000 and less than or equal to 5000
(f) Add a new column NEW_PRICE into the product_master table.
(g) Rename the column product_rate of Sales_Order_Details to new_product_rate.
(h) List the products in sorted order of their description.
(i) Display the order number and date on which the clients placed their order.