Professional Documents
Culture Documents
Mobile Management System
Mobile Management System
DDL COMMANDS
-- Distributor Info table
USE mobile_db;
Distributor_ID varchar(10) ,
Distributor_Name varchar(20),
Address varchar(100),
Mobile BIGINT(10),
);
);
Customer_ID varchar(10) ,
Customer_Name varchar(20),
Address varchar(100),
Mobile BIGINT(10),
SalesId INT,
DML COMMANDS
Problem # 1: WAQ to Display the mobile details such as IMENO, Model Name produced by the
manufacturer "Nokia".
Problem # 4: WAQ to display distributor id ,mobile supply details such as mobile model name, quantity
supplied in sorted order of distributor id.
Problem # 5: WAQ to display the IMENO,model name,manufacturer,price and discount of all mobiles
regardless of whether the mobile is sold or not.
Problem # 6: WAQ to display the distributor details such as distributor name,mobile number and email
of the model 'Nokia 1100'.
Problem # 7: WAQ to display the Ime No and Model Name of mobiles which are not sold(Hint : use
minus operator)
Solution: select ime_no ,model_name from mobile_master minus select ime_no ,model_name from
sales_info;
Problem # 8: WAQ to display the Ime No and Model Name of mobiles which are sold(Hint : use intersect
operator)
Solution: select ime_no ,model_name from mobile_master intersect select ime_no ,model_name from
sales_info;
Problem # 9: WAQ to display the ImeNO, Model Name,Manufacturer, Price and NewPrice of all mobiles.
(Hint : find new price as 10% of the price with column name "New Price")
Solution: select model_name,manufacturer,price from mobile_master where price between 8500 and
25300;
Average Questions:
Problem # 1: WAQ to display the Model Name,Manufacturer, Price , Warranty , Internal memory,
memory card capacity,gprs support,bluetooth,camera quality and OS for the mobile with IME NO
"MC1000104" .
Solution: select
m1.model_name,m1.manufacturer,m1.warranty_in_years,m1.price,m2.Internal_mem_in_MB,m2.Mem
ory_Card_Capacity_GB, m2.GPRS,m2.Bluetooth,m2.Camera_Quality,m2.OS from mobile_master m1
join mobile_specification m2 on m1.IME_No=m2.IME_No where m1.IME_no='MC1000104';
Solution: select
m1.ime_no,m1.model_name,m1.manufacturer,m1.price,m2.gprs,m2.Memory_Card_Capacity_GB from
mobile_master m1 join mobile_specification m2 on m1.ime_no=m2.ime_no where m2.GPRS='Yes' and
m2.Memory_Card_Capacity_GB>=16;
Problem # 3: WAQ to display the customer name ,mobile purchase details such as IMENO,Model
Name ,Purchase Date,Net amount paid in sorted order of customer name.
Problem # 4: WAQ to display the distributor details such as distributor id ,name ,address,contact no who
has supplied the maximum number of mobiles.
Problem # 5: WAQ to display the IMENO,model name,manufacturer,price and discount of all mobiles
regardless of whether the mobile is sold or not.
Problem # 6: WAQ to display the report containing the sales date and total sales amount of the dates
between 20-APR-12 and 25-APR-12.
(Hint : total sales amount column should be displayed as "Total Sales Amount" )
Problem # 7: WAQ to display mobile imeno,model name,manufacturer and price of the mobiles which
are having the longest battery life.
Problem # 8: WAQ to display the ImeNO, Model Name,Manufacturer, Price of mobiles having the
maximum price.
Problem # 9: WAQ to display the customer details such as Customer ID,Customer Name, Address, Total
Purchase amount.
Problem # 10: WAQ to display the most costly mobile information such as mobile model, manufacturer
and price manufactured by "Samsung".
Solution: s
Complex Questions:
•Problem # 1: WAQ to display the customer details such as Customer ID,Customer Name, Address and
Total Purchase amount having the maximum purchase amount.
Solution: select
m1.ime_no,m1.model_name,m1.manufacturer,d1.distributor_id,d1.distributor_name,m1.price from
mobile_master m1 join distributor d1 on m1.distributor_id=d1.distributor_id and
d1.distributor_id=(select distributor_id from distributor where distributor_name='AXA Ltd');
Problem # 4: WAQ to display distributor details who supplies mobile with the following speficiations
such as 3G Network, Android OS, 5 MP Camera.
Problem # 5: WAQ to Display the maximum sold mobile model name and manufacturer .