I want to have the average trip_duration for values that are over 0, so i thought to cast time as int64 TO be able to campare it to 0 in the where clause, but it didn't really work.
(SELECT (ended_at-started_at) as trip_duration
FROM `case-study-bikes-trips.bikes_trips.03_2021` )
select CAST (avg(trip_duration) as INT64)
from duration
It tells me "Invalid cast from INTERVAL to INT64".