Answer the following questions.
Vehicle
Challan
Offence
(a) Based on these tables write SQL statements for the following queries:
(i) Display the dates of first registration and last registration from the table Vehicle.
(ii) Display the number of challans issued on each date.
(iii) Display the total number of challans issued for each offence.
(iv) Display the total number of vehicles for which the 3rd and 4th characters of RegNo are '6C'.
(v) Display the total value of challans issued for which the Off_Desc is 'Driving without License'.
(vi) Display details of the challans issued on '2010-04-03' along with Off_Desc for each challan.
(vii) Display the RegNo of all vehicles which have been challaned more than once.
(viii) Display details of each challan alongwith vehicle details, Off_desc, and Challan_Amt.
(b) Identify the Foreign Keys (if any) of these tables. Justify your choices.
(c) Should any of these tables have some more column(s)? Think, discuss in peer groups, and discuss with your teacher.