Subject HyperLogLog in Pure SQL
Author marius adrian popa
Using probabilistic counting we'll make count distinct even faster, trading a little accuracy for the increase in speed.

We'll optimize a very simple query, which calculates the daily distinct sessions for 5,000,000 gameplays (~150,000/day)