I created a column to track the time that passed between a start time and the end time of a bike ride. The column saved as an Interval like this "0-0 0 -0:16:15" I'm trying to find the average ride time interval, but I feel like converting it to TIME or FLOAT will give me a more accurate ride time. When I used the average function for the column as Interval data type I felt it was inaccurate.
This was the average function I used:
SELECT AVERAGE(ride_time)
FROM nifty-rex-386114.cyclistic_case_study.2_cleaned_2023_04
WHERE member_type = casual
2 questions:
- Would it be helpful to change the data type of this column from INTERVAL to TIME or FLOAT?
- How would I do that?
- And what's the best way for me to find the Average?
p.s. I'm working in BigQuery