Group By with condition - Mailing list pgsql-sql

From JORGE MALDONADO
Subject Group By with condition
Date
Msg-id CAAY=A7-zfNFtiaLn6d8PYsVreKZjdRRis46XZphsixN3nsQFZA@mail.gmail.com
Whole thread Raw
Responses Re: Group By with condition  (Steve Midgley <science@misuse.org>)
List pgsql-sql
Let´s suppose I have the following query:

SELECT fld1, fld2, fld3, fld4 FROM tblTable1
INNER JOIN ............
GROUP BY fld1, fld2, fld3, fld4

What I need is to group by "fld4" if and only if its value is "TL". If its value is different than "TL" then no grouping should be performed on this field.

I will very much appreciate ypur feedback.

Respectfully,
Jorge Maldonado

pgsql-sql by date:

Previous
From: Suresh Raja
Date:
Subject: Re: extracting PII data and transforming it across table.
Next
From: Steve Midgley
Date:
Subject: Re: Group By with condition