1. 学习
  2. /
  3. 课程
  4. /
  5. Writing Functions and Stored Procedures in SQL Server

Connected

练习

Hot Deck imputation

Create a function named dbo.GetTripDistanceHotDeck that returns a TripDistance value via Hot Deck methodology. TripDistance should have a precision of 18 and 4 decimal places.

说明

100 XP
  • Create a function named dbo.GetTripDistanceHotDeck() that returns a numeric data type.
  • Select the first TripDistance value from YellowTripData sample of 1000 records.
  • The sample of 1000 records should only include those where TripDistance is more than zero.