Courseiva

PDE Preparing and Using Data for Analysis Practice Question

Which BigQuery SQL function can be used to get an approximate count of distinct values in a large column faster than COUNT(DISTINCT) with lower accuracy?

⚠ Common exam trap

The trap is a fabricated-sounding option (DISTINCT_COUNT) that mimics the correct function name, plus the presence of the exact COUNT(DISTINCT) the question says to avoid — candidates must recognize the real BigQuery function name.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

APPROX_COUNT_DISTINCT

APPROX_COUNT_DISTINCT is a BigQuery function that returns an approximate count of distinct values using a HyperLogLog++ algorithm. It is significantly faster and uses far fewer resources than COUNT(DISTINCT) on large datasets, at the cost of a small statistical error (typically under 1%). This matches the requirement for a faster, lower-accuracy distinct count.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    APPROX_QUANTILES

    Why it's wrong here

    APPROX_QUANTILES returns approximate percentile boundaries of a column, not a distinct-value count, so it cannot answer the question. It is tempting because it is a genuine approximate aggregate that trades accuracy for speed on large datasets, and would be correct when computing medians or percentile distributions.

  • ✗

    COUNT(DISTINCT)

    Why it's wrong here

    COUNT(DISTINCT) is the exact function the question seeks a faster, lower-accuracy alternative to; it computes precise distinct counts and scales poorly on large columns. It is tempting because it is the standard, familiar way to count distinct values, and would be correct when exact results are required on modest data.

  • ✓

    APPROX_COUNT_DISTINCT

    Why this is correct

    APPROX_COUNT_DISTINCT uses HyperLogLog++ sketches to estimate cardinality, scanning far less data than COUNT(DISTINCT)'s exact deduplication. This satisfies the stem's demand for faster approximate distinct counts on large columns, trading a small, bounded error rate for substantially reduced query cost and latency.

  • ✗

    DISTINCT_COUNT

    Why it's wrong here

    DISTINCT_COUNT is not a BigQuery SQL function, so the query fails to parse. It is tempting because the name reads like a plausible synonym for the exact aggregate being replaced, and a similarly named construct would be correct in other SQL dialects or engines that expose such a function.

About these practice questions

One of 747 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Google Cloud exam blueprint

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.