BCA Semester II CA 119 - Database Fundamentals Assignment-2: Getting Familiar With Basic SQL Syntax (DDL, DML Statements)
BCA Semester II CA 119 - Database Fundamentals Assignment-2: Getting Familiar With Basic SQL Syntax (DDL, DML Statements)
QTY_ORDERED NUMBER(8)
QTY_DISP NUMBER(8)
PRODUCT_RATE NUMBER(10,2)
Sales Salesman Addr Addre City Pincode Stat Salea Tgt_T Ytd Rem
man_N _Name ess1 ss2 e mt o_Get sale arks
o s
S00001 Kiran A/14 Worli Bombay 400002 MA 3000 100 50 Good
H
S00002 Manish 65 Narim Bombay 400001 MA 3000 200 100 Good
an H
S00003 Ravi P-7 Bandr Bombay 400032 MA 3000 200 100 Good
a H
S00004 Ashish A/5 Juhu Bombay 400044 MA 3500 200 150 Good
H
Table Name: SALES_ORDER
QUERIES
3. Retrieve the list of names and the cities of all the clients.
5. Find the names of all clients having ‘a’ as the second letter in their names.
6. Find out the clients who stay in a city whose second letter is ‘a’.
7. Find the list of all clients who stay in city ‘Bombay’ or city ‘Delhi’ or city ‘Madras’.
9. Print the list of clients whose bal_due are greater than value 10000.
10. Print the information from sales_order table of orders placed in the month of
January
11. Display the order information for client_no ‘C00001’ and ‘C00002’.
12. Find the products with description as ‘1.44 Drive and ‘1.22 Drive.’
13. Find the products whose selling price is greater than 2000 and less than or equal to
5000.
14. Find the products whose selling price is more than 1500 and also find the new
selling price as original selling price*15.
20. List the names, city and state of clients not in the state of ‘Maharashtra’.
21. List the product_no, description, sell_price of products whose description begin
with letter ‘M’.
22. List all the orders that were cancelled in the month of March.
23. Display all the Client names in Capitals and State in Lowercase.
24. Price must be displayed in 8,2 format. Put '*' before the amount. e.g. ***23.90.
30. Determine the maximum and minimum product prices. Rename the title as
max_price and min_price respectively.
31. Count the number of products having price greater than or equal to 1500.
32. Find all the products whose qty_on_hand is less than reorder level.
34. Print the description and total qty sold for each product.
36. Calculate the average qty sold for each client that has a maximum order value
of 15000.00
37. Find out the total sales amount receivable for the month of jan.It will be the
sum total of all the billed orders for the month.
{description} worth Rs. {total sales for the product} was ordered in the month
of {s_order_date in month format}
40. Find out the total Qty_Disp and Qty_ordered of each item from
Sales_order_Details.
41. Find out the no. of sales transactions of each day from Sales_order_details.
42. Compute average, minimum and maximum Qty_ordered for each product.