Re: Where clause

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Where clause
Дата
Msg-id 4680EE41.3020200@archonet.com
обсуждение исходный текст
Ответ на Re: Where clause  (Michael Landin Hostbaek <mich@the-lab.org>)
Список pgsql-sql
Michael Landin Hostbaek wrote:
> A. Kretschmer (andreas.kretschmer) writes:
>> *untested*
>>
>> select cid, sum(case when click = true then 1 else 0 end), sum(case when
>> view = true then 1 else 0 end) from ...
>>
> 
> Thanks, but I need the DISTINCT contactid - I don't want the same
> contactid counted twice.

... GROUP BY cid

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: Where clause
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: yet another simple SQL question