WITH trips_by_day AS
(
SELECT DATE(trip_start_timestamp) AS trip_date,
COUNT(*) as num_trips
FROM `bigquery-public-data.chicago_taxi_trips.taxi_trips`
WHERE trip_start_timestamp >= '2016-01-01' AND trip_start_timestamp < '2018-01-01'
GROUP BY trip_date
ORDER BY trip_date
)
SELECT trip_date,
avg(num_trips)
OVER (
order by trip_date
rows between 15 preceding and 15 following
) AS avg_num_trips
FROM trips_by_day
谁能给我解释一下的意思rows between 15 preceding and 15 following
?