Support the project! The site exists thanks to the community. If the help covers the expenses - the platform remains free.Support →
SQL code copied to buffer
Task 65:

Time Series of Trip Dynamics

Build a monthly time series of trips. For each month, return the following metrics:
- trip_count: Total number of trips
- total_revenue: Total revenue from trips
- previous_month_trip_count: Trip count from the previous month
- trip_count_change_percentage: Percentage change in trip count compared to the previous month

Include only rows with a specified tpep_pickup_datetime and total_amount.

Use DuckDB syntax to write your answer. Descriptions of tables are provided in the right pane.

Write your request in the field below and click the "Check it!" button.
Get hint
Copy code Clear editor

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.