Skip to main content
added 118 characters in body
Source Link

Version: PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

Version: PostgreSQL 13.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit

tag, format
Source Link
Erwin Brandstetter
  • 182.1k
  • 28
  • 457
  • 620

Playtime:fiddle

https://dbfiddle.uk/-zHbXWwP

Playtime:

https://dbfiddle.uk/-zHbXWwP
added 192 characters in body
Source Link

In the previous SQL snippet, I manually defined the static column names. These

These should be based on x values & hence dynamic.'dynamic' matching below

Thoughts?

select array (select distinct x from data order by x)
| x_campaigns               |
| ------------------------- |
| ["1","2","3","4","5","6"] |

PlaygroundThoughts?

Playtime:

In the previous SQL snippet, I manually defined the static column names. These should based on x values & hence dynamic.

Thoughts?

Playground:

In the previous SQL snippet, I manually defined the static column names.

These should be based on x values & hence 'dynamic' matching below

select array (select distinct x from data order by x)
| x_campaigns               |
| ------------------------- |
| ["1","2","3","4","5","6"] |

Thoughts?

Playtime:

added 1261 characters in body
Source Link
Loading
deleted 9 characters in body
Source Link
Loading
Source Link
Loading