Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
date_diff. date_diff('day', start, end) counts the days from start to end; use 'month' or 'year' to count those instead. It is end minus start, so an end before the start gives a negative number. Write a fixed as-of date as DATE 'YYYY-MM-DD' instead of today's date, so results never change.
select month, date_diff('day', month, DATE '2025-12-31') as days_to_year_end from targets where region_id = 1For the year-end review, customer success wants to know how many days each 2025 signup had been a customer by 31 December 2025.
For customers whose signup_date is in 2025, return customer_name and days_as_customer: the number of days from signup_date to 2025-12-31.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe