The following query works in Postgresql but not in Redshift:
WITH bar (baz) AS
(VALUES ('a'), ('b'), ('c'))
SELECT * from bar;
Which gives
baz
---
a
b
c
How can I replicate this behaviour in Redshift?
unfortunately UNION is the only way here:
WITH bar (baz) AS
(select 'a' union select 'b' union select 'c')
SELECT * from bar;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With