Professional Documents
Culture Documents
MANAGEMENT
ASSIGNMENT-1
Q-
Ans:-
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
2. Retrieve employee number and their salary…
INPUT
OUTPUT
3. Retrieve average salary of all employee…
INPUT
OUTPUT
4. Retrieve number of employees.
INPUT
OUTPUT
5. Retrieve district number of employees.
INPUT
OUTPUT
6. Retrieve total salary of employee group by
employee name and count similar names.
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
INPUT
OUTPUT
Information System Management (LAB)
Assignment – 2
Q1 i) INPUT:
OUTPUT:
ii) INPUT:
OUTPUT:
Q2 INPUT:
OUTPUT:
Q3 INPUT:
OUTPUT:
Q3
i) Find out the names of all the clients.
INPUT:
OUTPUT:
OUTPUT:
iii) List the various products available from the
product_master table.
INPUT:
OUTPUT:
iv) List all the clients who are located in
Bombay.
INPUT:
OUTPUT:
OUTPUT:
INPUT:
OUTPUT:
INPUT:
OUTPUT:
ix) Find the product whose selling price is
greater than 2000 and less than or equal to 5000.
INPUT:
OUTPUT:
INPUT:
OUTPUT:
INPUT:
OUTPUT:
ASSIGNMENT 3
(RESTRICTION ON TABLE )
Sales_master
sales_order_details
Q3 ADD THE NULL CONSTRAINT IN THE PRODUCT_MASTER TABLE WITH THE COLUMN
DESCRIPTION, PROFIT PERCENT, SELL PRICE AND COST PRICE.
SQL> alter table
product_master
MODIFY(sellprice number(8) NOT NULL)
MODIFY(costprice number(8) NOT NULL)
MODIFY(profitpercent number(6) NOT NULL)
MODIFY(description varchar2(15) NOT NULL);
Q4 CHANGE THE SIZE OF THE CLIENT_NO FIELD IN THE CLIENT_MASTER TABLE.
Select product_no,description
From product_master11
Where Item_sold_to=’Ivan Sayross’;
FIND OUT THE PRODUCT AND THEIR QUANTITIES THAT WILL HAVE
DO DELIVERED.
Select product_description,product_quantity
From product_master
Where status=’deliver’;
Select p.product_no,p.s_orderno
From sales_order11 p,sales_order_detail s
Where p.product_no=s.product_no
And s.quantity<5 AND s.description =’1.44 floppies’;
Select p.product_no,p.quantities,p.description
From sales_order p,client_master c
Where p.product_no=c.itemorder-id
And c.client_no=’C000001’ OR ’C000002’;
ASSIGNMENT 6
Select description,quantity_sold
From product_master11
Order by quantity sold ASC;
Select product_no,quantity_ordered,description
From sales_order_details11
Group by product_no;
ASSIGNMENT 7
Q.1 Find the product no. and description of non moving products
i.e. not being sold.
Ans:-
SQL> select sales_order_details.product_no,description from
sales_order_details,product_master where qty_disp = 0 and
sales_order_details.product_no = product_master.product_no;
PRODUC DESCRIPTION
------------- --------------------
P00101 1.44 Floppies
Q.2 Find the customer name, address1,address2.city and pincode for
the client who has placed order no. ‘O19001’.
Ans:-
SQL> select name,address1,address2,city,pincode from
client_master,sales_order where order_no = 'O19001' and
sales_order.client_no = client_master.client_no;
NAME ADDRESS1 ADDRESS2 CITY PINCOD
E
----------- ---------------- ------------------- --------------- -----------
----
Ivan Bayross Z/114 Worli Bombay 400054
Q.3 Find the client name that has placed orders before the month of
May’09.
SQL> select name,order_date from client_master,sales_order where
order_date < '1-May-09' and sales_order.client_no =
client_master.client_no;
Ans:-
NAME ORDER_DAT
---------------- ----------------
Vandana Saitwal 12-JAN-08
Pradama Jaguste 20-MAY-08
Basu Navindgi 25-JAN-08
Ivan Bayross 18-FEB-08
Ivan Bayross 03-APR-08
Q.4 Find out if the product ‘1.44 Drive’ has been ordered by any
client and print the client_no, name to whom it was sold.
Ans:-
SQL> select
description,sales_order_details.order_no,client_master.client_no,name
from product_master, client_master,sales_order,sales_order_details
where description = '1.44 Drive' and product_master.product_no =
sales_order_details.product_no and sales_order_details.order_no =
sales_order.order_no and sales_order.client_no =
client_master.client_no;
DESCRIPTION ORDER_ CLIENT NAME
-------------------- ------------- ------------ --------------------
1.44 Drive O46899 C00014 Ajay Navindgi
Q.5 Find names of the clients who have placed orders worth Rs.
10000 or more.
SQL> select name,product_master.product_no,sell_price from
client_master,product_master,sales_order,
sales_order_details where sell_price >= 10000 and
product_master.product_no = sales_order_details.product_no and
sales_order_details.order_no = sales_order.order_no and
sales_order.client_no = client_master.client_no;
Ans:-
NAME PRODUC SELL_PRICE
---------------- -------------- ------------------
Ivan Bayross P03453 13500
Q.7 Select the names of persons who are in Mr. Pradeep’s
department and who have also worked on an inventory control
system.
Code:
SELECT ClientName as 'Name'
FROM Client
WHERE Client.City = 'Bombay'
UNION ALL SELECT `Salesmanname` as 'Name'
FROM SalesTable
WHERE SalesTable.City = 'Bombay';
Output:
Output: