Oracle SQL Queries 06151134

Download Solution: Click to Download Solution
Solution File Name: Task2_123AAA.doc
Unzip Password: prestobear.com

Problem:
a.Write a stored procedure that displays the contact details of viewing parties who haven’t visited the dealership for over six months. For organisations, include the organisation name in the output. For international guests, include their country in the output.
b.Write a stored procedure that accepts a particular year as input, and as output displays the number of cars sold grouped by the 3 mileage groups (Low Mileage: <50000km, MediumMileage: >=50000km & <150000km, High Mileage: >=150000km). Also include the total number of cars sold in the result.
c.Write a stored function that uses a senior agent’s ID as input and calculates the total commission owed to date for that agent. You also need to show an SQL statement to display the total amount of commission

Sample Answer:

Add Comment