APPROX_COUNTD_AGG

  • Last update:  2022-05-12
  • 1. Overview

    When the calculation data is very large, the traditional accurate deduplication count may not be calculated, and the approximate deduplication count can be used to quickly calculate the result.

    GrammarAPPROX_COUNTD_AGG(array)According to the current analysis dimension, the approximate deduplication count of a field is dynamically returned, and the generated result is a dynamic data column with the number of rows consistent with the number of rows in the current analysis dimension.
    Parameterarray

    It must be the result returned by a non-aggregate function formula, which can be a calculation result of an indicator field, dimension, or indicator field and a common formula.

    2. Matters needing attention

    • Only supports use in real-time data.

    • This function only supports the following database systems: CLICKHOUSE, ORACLE (12c r1, 12.1.0.2 and above), SQLSERVER (2019 and above), PRESTO, REDSHIFT, VERTICA. When the database system is REDSHIFT, due to the limitation of REDSHIFT, only aggregation operations that need to be sorted (such as deduplication count, median, percentile, approximate deduplication count) can be performed on the same field at the same time. And this aggregation operation on 2 or more fields at the same time will cause errors. When the database system is VERTICA, due to the limitation of VERTICA, only one of (precise) deduplication counting or approximate deduplication counting can be used at the same time.

    • Supports the use of a parameter of any type.

    3. Examples

    When the user's horizontal axis is the dimension field "Day", the value returned by the calculation indicator APPROX_COUNTD_AGG() on the vertical axis is the approximate deduplication number of daily sales.

    When the user's horizontal axis is the dimension field "Month", the value returned by APPROX_COUNTD_AGG() is the approximate deduplication number of monthly sales.

    For example, calculate the approximate daily deduplication count for "ORDERID", as shown in the following figure:

    46.png

    附件列表


    主题: Advanced Data Analyis
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy