We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, when we perform pre-aggregation for AVG, we use SUM(expression) / COUNT(1).
SUM(expression) / COUNT(1)
COUNT(1) will give the count of another column, which may have a different number of non-null values than the one we're interested in.
COUNT(1)
For example:
day | measure
1 | 1 2 | 1 3 | NULL
The correct COUNT(measure) is 2, but COUNT(1) is 3 instead.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, when we perform pre-aggregation for AVG, we use
SUM(expression) / COUNT(1)
.COUNT(1)
will give the count of another column, which may have a different number of non-null values than the one we're interested in.For example:
day | measure
1 | 1
2 | 1
3 | NULL
The correct COUNT(measure) is 2, but COUNT(1) is 3 instead.
The text was updated successfully, but these errors were encountered: