🙏 We really need your support. We need funding to continue our mission: publishing new lessons and improving the platform. If you can, please support the project with a donation. Help the project now →
SQL code copied to buffer
Task 68:

Preparing a Clean Dataset

Prepare a cleaned trip dataset for further analysis. Keep only records with specified timestamps where the dropoff time is not earlier than the pickup time, the distance is positive, the total cost is nonnegative, and the passenger count is positive. Replace a missing `payment_type` with `Unknown`. Add trip duration in minutes and trip cost per mile. Return the first 100 cleaned records.

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.