Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLself-joinsSingle-choice MCQ

You self-join a sequence table to find consecutive-day pairs. What subtle bug does this ON clause introduce?

SELECT a.day, b.day FROM readings a JOIN readings b ON b.day = a.day + 1;