In the terminal below, you can run SQL queries on rideshare data for the past year. All queries are run through DuckDB-Wasm, an in browser database that you can query with SQL.
For a list of city files you can query, type:
.files LIST
And then query the file directly with SQL:
SELECT * FROM 'boston.parquet' LIMIT 100
If you'd like to download all data for a city, you can download the parquet files below:
Need a few ideas of what to query?
SELECT
start_station_name,
end_station_name,
COUNT(*) as trips,
ROUND(AVG(DATEDIFF('second', start_time, end_time)) / 60) as avg_duration_minutes,
ROUND(MEDIAN(DATEDIFF('second', start_time, end_time)) / 60 ) as median_duration_minutes
FROM
'boston.parquet'
WHERE
start_station_name = 'Dana Park'
GROUP BY
start_station_name,
end_station_name
ORDER BY
trips DESC;
SELECT
EXTRACT(HOUR FROM start_time) AS hour,
COUNT(*) AS trips,
MEDIAN(DATEDIFF('minute', start_time, end_time)) AS median_trip_duration
FROM
'boston.parquet'
GROUP BY
hour
ORDER BY
hour;