Re: Help on using hyperloglog in Postgresql

Поиск
Список
Период
Сортировка
Искать
От
Andreas Kretschmer
Тема
Re: Help on using hyperloglog in Postgresql
Дата
Msg-id
20161007130243.GA6132@tux
Ответ на
Список
Дерево обсуждения
Help on using hyperloglog in Postgresql "Abdlhamed, Mohamed" <M.A.Abdlhamed@2013.ljmu.ac.uk>
Re: Help on using hyperloglog in Postgresql Andreas Kretschmer <akretschmer@spamfence.net>
Abdlhamed, Mohamed  wrote:

> I am new to PostgreSQL and SQL. I want to apply HLL in PostgreSQL on a table
> contain traffic information each stored in separate column, so I want to
> estimate the cardinality of every distinct IP. the cardinality here is how many
> ports contacted distinct per IP. IPs stored in 'Destination' column and ports
> stored in 'DetsPort'. can anyone help me with full code and steps please!

if i understand you, you have a table with 2 columns, 'destination' and
'destport', right? And you want to know how many ports per destination
there are, right?


select 
  destination
  , count(destport) 
from 
group by destination;




Regards, Andreas Kretschmer
-- 
Andreas Kretschmer
http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-novice по дате отправления
От: Abdlhamed, Mohamed
Дата:
От: Binand Sethumadhavan
Дата:
Сообщение: \COPY in script
FAQ