Skip to content

Tag: amazon-redshift

Redshift SQL — transposing rows by id into columns

I am using Redshift SQL. I would like to transpose the distinct rows of “Id1” in “Table” into columns. Thus the output should be like the bottom most table, providing weights as columns for each “Id2”.Or Alternatively, concatenate weights into one column. Any guidance on fu…

Redshift Postgres 8

I’m trying to write a query to solve a logical problem using Redshift Postgres 8. Input column is a bunch of Order IDs and Step Group IDs and desired output is basically a sequence of the IDs as you can see in the screenshot. If you could help me answer this question, that would be great, thanks! This i…