Re: SQL Query Syntax help - Mailing list pgsql-admin

From Geoff Winkless
Subject Re: SQL Query Syntax help
Date
Msg-id CAEzk6fcK_FfUC65ZK5QN3o2yG29c0f1-bRpxThtB6x6gGZ6Jfw@mail.gmail.com
Whole thread Raw
In response to SQL Query Syntax help  ("srikkanth" <srikkanth16081991@rediffmail.com>)
List pgsql-admin
On Wed, 22 Jan 2020 at 11:00, srikkanth <srikkanth16081991@rediffmail.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

pgsql-admin by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: SQL Query Syntax help
Next
From:
Date:
Subject: pg_rewind