From: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj> |
---|---|
To: | srikkanth <srikkanth16081991(at)rediffmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SQL Query Syntax help |
Date: | 2020-01-22 12:06:01 |
Message-ID: | CAEzk6fcK_FfUC65ZK5QN3o2yG29c0f1-bRpxThtB6x6gGZ6Jfw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
On Wed, 22 Jan 2020 at 11:00, srikkanth <srikkanth16081991(at)rediffmail(dot)com>
wrote:
> Can you please help me in writing the syntax for the below mentioned table.
>
Suggest looking at the crosstab function.
https://www.postgresql.org/docs/current/tablefunc.html
crosstab(text source_sql, text category_sql)
Produces a "pivot table" with the value columns specified by a second
query
Geoff
From | Date | Subject | |
---|---|---|---|
Next Message | srikkanth | 2020-01-22 12:07:23 | Re: SQL Query Syntax help |
Previous Message | Daniel Verite | 2020-01-22 11:58:33 | Re: SQL Query Syntax help |
From | Date | Subject | |
---|---|---|---|
Next Message | srikkanth | 2020-01-22 12:07:23 | Re: SQL Query Syntax help |
Previous Message | Daniel Verite | 2020-01-22 11:58:33 | Re: SQL Query Syntax help |