Re: finding duplicate numbers in a select distinct statement

Поиск
Список
Период
Сортировка
От Terry
Тема Re: finding duplicate numbers in a select distinct statement
Дата
Msg-id 8ee061011003030845y63c0bd40w23e70806558404b8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: finding duplicate numbers in a select distinct statement  (Terry <td3201@gmail.com>)
Список pgsql-general
2010/3/3 Terry <td3201@gmail.com>:
> 2010/3/3 Grzegorz Jaśkiewicz <gryzman@gmail.com>:
>> select count(*) AS count, error, ev_text FROM clients_event_log GROUP BY
>> error, ev_text;
>>
>> you can add 'HAVING count(*) > X'; , if you want to see only those with
>> count above X, etc.
>>
>>
>> --
>> GJ
>>
>
> I was just about to reply to the group.  Would this work too?
> psql -d foo -c 'SELECT COUNT(DISTINCT(error)) AS count,error,ev_text
> FROM dsclient_logs WHERE ev_id > 23572151 GROUP BY error,ev_text'
>

My statement was broke.  GJ's was spot on.  Thanks!

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

Предыдущее
От: Brad Nicholson
Дата:
Сообщение: Work Mem Allocation Questions
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Work Mem Allocation Questions