SQLDAXExcelPython
LeaderboardRunLifetime
Interview classicsHard30 points

Longest streak of days

Find the longest run of consecutive days with at least one sale of Furniture. Return the first day, the last day and the number of days. If runs tie, return the earliest.

Hard questions are part of Lifetime and Pro. Read it here, and unlock running and checking your answer from the plans.

Show solutionLifetime

Runs in your browser with DuckDB, whose SQL is close to PostgreSQL. Nothing you type is sent to a server unless you save a score.

SQLselect text to run only that part
Loading editor…

Press Ctrl+Enter or Run to see the result here.