NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
The DISTINCT in Your COUNT (boringsql.com)
natmaka 9 minutes ago [-]
muth02446 36 minutes ago [-]
If you are satisfied with an approximation of "DISTINCT", there is a facinating probabilistic algorithm by Flajolet and Martin

https://en.wikipedia.org/wiki/Flajolet%E2%80%93Martin_algori...

which fits on 10 lines and does not require sorting. Improved versions of it are LogLog and HyperLogLog.

esafak 19 minutes ago [-]
APPROX_COUNT_DISTINCT / APPROX_DISTINCT

https://www.sketchingbigdata.org/

thecaio 36 minutes ago [-]
Hard to make a case to engange with an AI written article even if not fully slop
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 20:48:35 GMT+0000 (Coordinated Universal Time) with Vercel.