Day 2 SQL Practice
Day 2 SQL Practice
Write a Query to Display the IME Number, Model Name of mobiles which is
manufactured by "Nokia".
2. Write a Query to display IME number, Model Name, Manufacturer and Camera Quality of
mobiles whose camera quality is 5MP.
3. "Write a Query to display the Mobile Model Name and respective number of mobiles sold
on the date 23-Apr-2012 for each mobile model.
Hint: For example, if 2 ""Nokia 1100"" and 1 ""Nokia C5-03"" are sold on the date 23-Apr-
2012 then display both the records. Use ""NoofMobilesSold"" as alias name for the number
of mobiles field."
4. "Write a Query to display the distributor id, mobile model name, number of mobiles of
the particular model name supplied to the distributors group by model name and distributor
id and sort by the distributor id.
Hint: For example, if 3 ""Nokia 1100"" and 1 ""Nokia C5-03"" are sold to one distributor then
display both the records. Display the distributor id, model name and number of mobiles of a
particular model name. Use ""NoofMobilesSupplied"" as alias name for the number of
mobiles."
5. "Write a Query to display the IME number, model name, manufacturer, price and
discount of all mobiles regardless of whether the mobile is sold or not. Hint: Fetch the price,
IME no and model name from mobile_master table.
Example: For the mobile model ""Samsung GalaxyTAB with IME NO ""MC1000103"" is sold
and other with IME No ""MC1000110"" is not sold. Then both the mobiles details namely
IME number, model name, manufacturer, price and discount needs to be displayed. "
6. Write a Query to display the distributor name, mobile number and email of distributors
selling model 'Nokia 1100'.
7. Write a Query to display the IME Number and Model Name of mobiles which are not sold.
Hint: The details of the sold mobiles are available in the "SALES_INFO" table and the overall
mobile models are available in the mobile_master table.
8. Write a Query to display the IME Number, Model Name and net amount of the mobile
which has the highest net amount.
9. "Write a Query to display the IME Number, Model Name, Manufacturer, Price and New
Price of all mobiles.
Hint: Fetch the price, name and IME number from mobile master table. Add 10% to the old
price to find new price and display with alias name ""NewPrice"". Formula = price + (price *
10/100)"
10. Write a Query to display mobile model name, manufacturer and price for the mobiles
having a price range between 8500 and 25300.
11. Write a Query 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"
12. "Write a Query to display IME Number, Model Name, Manufacturer, Price ,GPRS
information, Memory card capacity of mobiles which has GPRS support with memory card
capacity 16GB or above.
Hint: Fetch the price and model name from mobile_master table. Use “discount” as alias
name for displaying the discount of all mobiles."
15. Write a Query to display the sales date and total net amount of all the mobiles based on
the sales date that are sold between 20-APR-12 and 25-APR-12. Hint: Total net amount
column should be displayed as "TotalNetAmount" (alias)