Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLwindow functions ROW_NUMBER RANKSingle-choice MCQ

Why does the following query raise an error in standard SQL?

SELECT id, ROW_NUMBER() OVER (ORDER BY id) AS rn FROM t WHERE rn = 1;