pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
serie of serie 3+ messages / 3 participants [nested] [flat]
* serie of serie @ 2020-04-18 07:18 Olivier Leprêtre <o.lepretre@gmail.com> 0 siblings, 2 replies; 3+ messages in thread From: Olivier Leprêtre @ 2020-04-18 07:18 UTC (permalink / raw) To: pgsql-general Hi, I would like to generate a serie of serie and didn’t find how. With generate_series. I can generate a serie 1 1 1 2 2 2 3 3 3 But how can I repeat this serie several times ? 1 1 1 2 2 2 3 3 3 1 1 1 2 2 2 3 3 3 1 1 1 2 2 2 3 3 3 Thanks for any help, -- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: serie of serie @ 2020-04-18 09:00 Rory Campbell-Lange <rory@campbell-lange.net> parent: Olivier Leprêtre <o.lepretre@gmail.com> 1 sibling, 0 replies; 3+ messages in thread From: Rory Campbell-Lange @ 2020-04-18 09:00 UTC (permalink / raw) To: Olivier Leprêtre <o.lepretre@gmail.com>; +Cc: pgsql-general On 18/04/20, Olivier Leprêtre (o.lepretre@gmail.com) wrote: > I would like to generate a serie of serie and didn’t find how. With > generate_series. I can generate a serie ... > But how can I repeat this serie several times ? Something like this? gotest=> select a, b from generate_series(1, 3) as t(a), generate_series(1, 3) as u(b); a | b ---+--- 1 | 1 1 | 2 1 | 3 2 | 1 2 | 2 2 | 3 3 | 1 3 | 2 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: serie of serie @ 2020-04-18 13:25 Achilleas Mantzios <achill@matrix.gatewaynet.com> parent: Olivier Leprêtre <o.lepretre@gmail.com> 1 sibling, 0 replies; 3+ messages in thread From: Achilleas Mantzios @ 2020-04-18 13:25 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org On 18/4/20 10:18 π.μ., Olivier Leprêtre wrote: > > Hi, > > I would like to generate a serie of serie and didn’t find how. With > generate_series. I can generate a serie > > 1 > > 1 > > 1 > > 2 > > 2 > > 2 > > 3 > > 3 > > 3 > > But how can I repeat this serie several times ? > > 1 > > 1 > > 1 > > 2 > > 2 > > 2 > > 3 > > 3 > > 3 > > 1 > with foo as (select floor(a) as a from generate_series(1.33333333333333333333,4,1.0/3.0) as s(a)) select foo.a from foo, generate_series(1,10) as itera(b) order by b,a; > 1 > > 1 > > 2 > > 2 > > 2 > > 3 > > 3 > > 3 > > 1 > > 1 > > 1 > > 2 > > 2 > > 2 > > 3 > > 3 > > 3 > > Thanks for any help, > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&...; > Garanti sans virus. www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&...; > > > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-04-18 13:25 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-04-18 07:18 serie of serie Olivier Leprêtre <o.lepretre@gmail.com> 2020-04-18 09:00 ` Rory Campbell-Lange <rory@campbell-lange.net> 2020-04-18 13:25 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox