The DISTINCT in Your COUNT
boringsql.com
The DISTINCT in Your COUNT
1–8 of 8 posts
Re: The DISTINCT in Your COUNT
#2https://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.
Re: The DISTINCT in Your COUNT
#3Re: The DISTINCT in Your COUNT
#4If 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.
Re: The DISTINCT in Your COUNT
#5Re: The DISTINCT in Your COUNT
#6Hard to make a case to engange with an AI written article even if not fully slop
Re: The DISTINCT in Your COUNT
#7But then again the article is being accused of heavy LLM. If you notice that COUNT(DISTINCT ...) doesn't parallelize and you ask an LLM to argue why, you get easily get an article without a good thread.