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

For the values 10, 10, 20, 30 ordered ascending, what does COUNT(*) OVER (ORDER BY v) return for each row?

SELECT v, COUNT(*) OVER (ORDER BY v) AS c FROM (VALUES (10),(10),(20),(30)) AS t(v) ORDER BY v;