The DISTINCT in Your COUNT
boringsql.com - 17 poäng - 3 kommentarer - 3556 sekunder sedan
Kommentarer (2)
- muth02446 - 1657 sekunder sedanIf 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.
- thecaio - 1626 sekunder sedanHard to make a case to engange with an AI written article even if not fully slop
Nördnytt! 🤓