clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1716905 fiddles created (23843 in the last week).

with s(r,i)as(select row_number()over(order by(rand()))r,*from string_split('7,6,5,4,3,2,1',','))select string_agg(l.i,',')from s,s l where l.r>s.r-s.i and l.r<=s.r and s.r-s.i>=0group by s.i
(No column name)
1
3,2
5,4,3
7,6,5,4
 hidden batch(es)