Forum Discussion
Cyb3rM0nK3y
12 days agoBronze I
So, this one took me some time to work out as well, I'm not sure I can provide any tips without giving the answer.
The query I used for 13 was - "from nyc-taxis | eval elaspsed_time = to_long(dropoff_datetime) - to_long(pickup_datetime) | sort elasped_time desc" This will then give you the logs sorted with the longest elasped_time first.
For 15 I used the query - "from nyc-taxis | eval elasped_time = to_long(dropoff_datetime) - to_long(pickup_datetime) | eval average_speed = trip_distance / elasped_time * 3600000 | sort elasped_time desc"
There may be cleaner ways of doing it or easier ways but that is how I managed to get the correct results.
Hope that helps