Re: pivot query with count - Mailing list pgsql-sql

From David Johnston
Subject Re: pivot query with count
Date
Msg-id 1365823755894-5752078.post@n5.nabble.com
Whole thread Raw
In response to Re: pivot query with count  (David Johnston <polobo@yahoo.com>)
Responses Re: pivot query with count  (Tony Capobianco <tony.capobianco1@gmail.com>)
List pgsql-sql
My prior comment simply answers your question.   You likely can rewrite your
query so that a separate grouping layer is not needed (or rather the group
by would exist in the main query and you minimize the case/sub-select column
queries and use aggregates and case instead).

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/pivot-query-with-count-tp5752072p5752078.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



pgsql-sql by date:

Previous
From: David Johnston
Date:
Subject: Re: pivot query with count
Next
From: Tony Capobianco
Date:
Subject: Re: pivot query with count