BigQuery COUNT(DISTINCT value) vs COUNT(value)

后端 未结 2 822
情话喂你
情话喂你 2020-11-29 07:35

I found a glitch/bug in bigquery. We got a table based on Bank Statistic data under the starschema.net:clouddb:bank.Banks_token

If i run the following query:

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 08:06

    I've used EXACT_COUNT_DISTINCT() as a way to get the exact unique count. It's cleaner and more general than COUNT(DISTINCT value, n > numRows)

    Found here: https://cloud.google.com/bigquery/query-reference#aggfunctions

提交回复
热议问题