Session Ready
Exercise

NYC Borough statistics SP

It's time to apply what that you have learned in this course and write a stored procedure to solve the first objective of the Taxi Ride business case. Calculate AvgFarePerKM, RideCount and TotalRideMin for each NYC borough and weekday. After discussion with stakeholders, you should omit records where the TripDistance is zero.

Instructions
100 XP
  • Select and group by pickup weekday and Borough.
  • Calculate AvgFarePerKM with dbo.ConvertDollar() and dbo.ConvertMiletoKM() utilizing .88 exchange rate to the Euro.
  • Display AvgFarePerKM as German currency, RideCount and TotalRideMin as German numbers.
  • Omit records where TripDistance is 0.