0% found this document useful (0 votes)
80 views3 pages

DBMS - Lab - CSE - IVSem Original

The document provides instructions to create tables, insert data, and answer queries using the client_master and product_master tables. It includes creating the tables with various attributes, inserting sample data, and 13 queries to run on the tables including finding specific records, modifying data, performing calculations, and joining records between the tables. It also provides a second set of objective questions to answer additional queries on the tables.

Uploaded by

munna micheal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views3 pages

DBMS - Lab - CSE - IVSem Original

The document provides instructions to create tables, insert data, and answer queries using the client_master and product_master tables. It includes creating the tables with various attributes, inserting sample data, and 13 queries to run on the tables including finding specific records, modifying data, performing calculations, and joining records between the tables. It also provides a second set of objective questions to answer additional queries on the tables.

Uploaded by

munna micheal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

i) Q1.

Create the client_master tables having following attributes


(Name, address1, address2, city, state, pincode, bal_due)

ii) Create the Product_master tables having following attributes


( Product_no, Description, Profit_percent, Unit_measure, Qty_on_hand, Reoder,
Sell_price, Cost_price )

Q2- Insert the following data into their respective tables:

Q3:- On the basis of above two tables answer the following Questionries:
i) Find out the names of all the clients.
ii) Retrieve the list of names and cities of all the clients.
iii) List the various products available from the product_master table.
iv) List all the clients who are located in Bombay.
v) Display the information for client no 0001 and 0002.
vi) Find the products with description as ‘1.44 drive’ and ‘1.22 Drive’.
vii) Find all the products whose sell price is greater then 5000.
viii) Find the list of all clients who stay in in city ‘Bombay’ or city ‘Delhi’ or
‘Madras’.
ix) Find the product whose selling price is greater than 2000 and less than or
equal to 5000.
x) List the name, city and state of clients not in the state of ‘Maharashtra’.

Question.1 Using the table client master and product master answer the following
Questionnaires.

i. Change the selling price of ‘1.44 floppy drive to Rs.1150.00


ii. Delete the record with client 0001 from the client master table.
iii. Change the city of client_no’0005’ to Bombay.
iv. Change the bal_due of client_no ‘0001, to 1000.
v. Find the products whose selling price is more than 1500 and also find the new
selling price as original selling price *15.
vi. Find out the clients who stay in a city whose second letter is a.
vii. Find out the name of all clients having ‘a’ as the second letter in their names.
viii. List the products in sorted order of their description.
ix. Count the total number of orders
x. Calculate the average price of all the products.
xi. Calculate the minimum price of products.
xii. Determine the maximum and minimum prices . Rename the tittle as ‘max_price’
and min_price respectively.
xiii. Count the number of products having price greater than or equal to 1500.

Answer the following Questionries

Q1. Make the primary key to client_no in client_master.


Q2. Add a new column phone_no in the client_master table.
Q3. Add the not null constraint in the product_master table with the columns description,
profit percent , sell price and cost price.
Q4. Change the size of client_no field in the client_master table.
Q5. Select product_no, description where profit percent is between 20 and 30 both
inclusive.

OBJECTIVE: Answer the following Queries:

1. Find out the product which has been sold to ‘Ivan Sayross.’
2. Find out the product and their quantities that will have do delivered.
3. Find the product_no and description of moving products.
4. Find out the names of clients who have purchased ‘CD DRIVE’
5. List the product_no and s_order_no of customers haaving qty ordered less than 5
from the order details table for the product “1.44 floppies”.
6. Find the products and their quantities for the orders placed by ‘Vandan Saitwal ’
and “Ivan Bayross”.
7. Find the products and their quantities for the orders placed by client_no “
C00001” and “C00002”
8. Find the order No,, Client No and salesman No. where a client has been received
by more than one salesman.
9. Display the s_order_date in the format “dd-mm-yy” e.g. “12- feb-96”
10. Find the date , 15 days after date.
Objective- Answer the following Queries:

Q1.- Print the description and total quantity sold for each
product. Q2.- Find the value of each product sold.
Q3.- Calculate the average quantity sold for each client that has a maximum order
value of
15000.
Q4.- Find out the products which has been sold to Ivan.
Q5.- Find the names of clients who have ‘CD Drive’.
Q6.- Find the products and their quantities for the orders placed by ‘Vandana’ and
‘Ivan’.

Q7.- Select product_no, total qty_ordered for each product.

Q8.- Select product_no, product description and qty ordered for each product.

Q9.- Display the order number and day on which clients placed their order.

Q10.- Display the month and Date when the order must be delivered.
Assignment NO.7

Question.
1. Find the product_no and description of non- moving products.
2. Find the customer name, address, city and pincode for the client who has placed
order no “019001”
3. Find the client names who have placed order before the month of may 96.
4. Find out if product “1.44 Drive” is ordered by only client and print the client_no
name to whom it was sold.
5. find the names of client who have placed orders worth Rs.10000 or more.
6. Select the orders placed by ‘Rahul Desai”
7. Select the names of persons who are in Mr. Pradeep’s department and who have
also worked on an inventory control system.
8. Select all the clients and the salesman in the city of Bombay.
9. Select salesman name in “Bombay” who has atleast one client located at
“Bombay”
10. Select the product_no, description, qty_on-hand,cost_price of non_moving items

You might also like