Courseiva

PDE Preparing and Using Data for Analysis Practice Question

Which BigQuery SQL function returns the rank of a row within a window, with gaps in the ranking for ties?

⚠ Common exam trap

PDE often tests the subtle differences between RANK(), DENSE_RANK(), and ROW_NUMBER(); candidates may pick DENSE_RANK() because they forget that RANK() leaves gaps, or pick ROW_NUMBER() because they overlook the tie-handling requirement.

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

✓

RANK()

The RANK() function assigns a rank to each row within a window, and when there are ties, it leaves gaps in the ranking sequence. For example, if two rows tie for rank 1, the next row receives rank 3. This behavior distinguishes it from DENSE_RANK(), which does not leave gaps. RANK() is part of BigQuery's window functions and is used with an OVER clause specifying the partitioning and ordering.

Answer analysis

Option-by-option breakdown

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

  • ✓

    RANK()

    Why this is correct

    RANK() assigns positions ordered by the window's ORDER BY, and tied values receive the same rank, leaving gaps before the next rank. It satisfies the explicit gap requirement, unlike DENSE_RANK(), which numbers ties consecutively without gaps.

  • ✗

    NTILE()

    Why it's wrong here

    NTILE() divides the window's rows into a specified number of roughly equal buckets, returning a bucket number rather than a rank. It suits percentile or quartile analysis, not the requirement for a rank value that leaves gaps after tied rows.

  • ✗

    DENSE_RANK()

    Why it's wrong here

    DENSE_RANK() assigns consecutive ranks without gaps when ties occur, so tied rows share a rank and the next distinct value receives the following integer. The stem explicitly requires gaps in the ranking, which RANK() produces instead.

  • ✗

    ROW_NUMBER()

    Why it's wrong here

    ROW_NUMBER() assigns each row a unique sequential integer regardless of ties, so equal values receive different numbers. It suits deduplication or pagination, not the requirement for tied rows to share a rank with subsequent gaps.

About these practice questions

This PDE question is part of Courseiva's 747-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.