Group By with condition

Поиск
Список
Период
Сортировка
От JORGE MALDONADO
Тема Group By with condition
Дата
Msg-id CAAY=A7-zfNFtiaLn6d8PYsVreKZjdRRis46XZphsixN3nsQFZA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Group By with condition  (Steve Midgley <science@misuse.org>)
Список 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 по дате отправления:

Предыдущее
От: Suresh Raja
Дата:
Сообщение: Re: extracting PII data and transforming it across table.
Следующее
От: Steve Midgley
Дата:
Сообщение: Re: Group By with condition