0% found this document useful (0 votes)
5 views4 pages

Dbms 3

Uploaded by

welehe9538
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)
5 views4 pages

Dbms 3

Uploaded by

welehe9538
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/ 4

Using the tables created previously generate the SQL statements for the operations mentioned below.

The tables in use are as follows:


a. Client_master

b. Product_master

c. Salesman_master

d. Sales_order

e. Sales_order_details

-> Perform the following computation on table data.


a. List the names of all clients having ‘a’ as second letter in their names.

b. List the clients who stay in the city whose first letter is ‘M’.
c. List all clients who stay in ‘Bangalore’ or ‘Mangalore’.

d. List all clients whose bal_due is greater than value 10000.

e. List all information from sales_order for orders placed in the month of June.

f. List the order information for the client no. ‘C00001’ and ‘C00002’.

g. List products whose selling price is greater than 500 and less than or equal to 750.
h. List products whose selling price is more than 500. Calculate a new selling price as, original selling price *.15.
Rename the new column in the output of the above query as new_price.

i. List the names, city and state of clients who are NOT in the state of ‘Maharashtra’.

j. Count the total no. of orders.

k. Calculate the average price of all products.


l. Determine the maximum and minimum product prices. Rename the output as max_price and min_price
respectively.

m. Count the number of products having price less than or equal to 500.

n. List all the products whose qnty_on_hand is less than reorder_lvl.

You might also like