RosettaCodeData/Task/List-comprehensions/DuckDB/list-comprehensions-1.duckdb
2025-08-11 18:05:26 -07:00

7 lines
223 B
Text

# for x in 1 to n, for y in x+1 to n, for z in y+1 to n
create or replace function xyz(n) as table (
from range(1,n+1) x(x)
cross join (from range(x+1,n+1) y(y))
cross join (from range(y+1, n+1) z(z))
);