Expand rows by column value in Presto -


i have data has id, number like:

id,  number  1,       5  2,       3 

and data be:

id, number  1,      0  1,      1  1,      2  1,      3  1,      4  1,      5   2,      0  2,      1  2,      2   2,      3  

select  t.id        ,s.n     mytable t          cross join unnest(sequence(0,t.number)) s (n) ; 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -