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

You apply NTILE(3) over five rows ordered 1..5. How are the rows distributed across the three buckets?

SELECT x, ntile(3) OVER (ORDER BY x) FROM (VALUES (1),(2),(3),(4),(5)) t(x);