PostgreSQL extension adding HyperLogLog data structures as a native data type
brew install postgresql-hll
postgresql-hll