Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Certified Data Analyst Associate Exam - Topic 2 Question 59 Discussion

Posted by Thaddeus on Oct 17, 2026 at 11:57 PM

A data analyst has been asked to use the below table sales_table to rank products within region by the sales.

Input table:

region product sales

WEST A 1880.59

EAST A 2045.99

EAST B 4583.23

WEST B 3391.19

The result of the query should look like this:

region product rank

EAST B 1

EAST A 2

WEST B 1

WEST A 2

Which query will accomplish this task?

A.

SELECT

region,

product,

RANK() OVER (

ORDER BY sales DESC

) AS rank

FROM sales_table;

B.

SELECT

region,

product,

RANK() OVER (

PARTITION BY product

ORDER BY sales DESC

) AS rank

FROM sales_table;

C.

SELECT

region,

product,

RANK() OVER (

PARTITION BY region

) AS rank

FROM sales_table;

D.

SELECT

region,

product,

RANK() OVER (

PARTITION BY region

ORDER BY sales DESC

) AS rank

FROM sales_table;

Suggested Answer: D

Get Premium Databricks Certified Data Analyst Associate Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
1 comments · newest first
VE
Vernell 2 hours ago
I think we need to rank products within each region, so I’m leaning towards an option that uses PARTITION BY region.
0/2000 characters

Save Cancel