Practice Exam

Question 65 of 75

Analyze KQL Ranking Query Results

You work as a Sales Data Analyst for Mark at MDFT Pro, a well-known training agency. MDFT Pro is processing streaming sales data from an external data provider that tracks course enrollment units sold by various partner companies across different training locations. Mark has asked you to analyze the following KQL code segment that ranks companies by units sold within each location. The code processes sales data and applies a dense ranking function to identify top-performing partners in each region.

datatable (Location:string, Company:string, UnitsSold:long)
[
    "New York", "Contoso", 300,
    "New York", "Litware", 1000,
    "New York", "Relecloud", 300,
    "New York", "Fabrikam", 200,
    "seattle", "Contoso", 300,
    "Seattle", "Litware"", 100,
    "Seattle", "Fabrikam", 100,
    "San Francisco", "Relegcloud", 500
    "San Francisco", "Litware", 500,
    "Washington DE", "Litware", 300,
    "Washington DC", "Contoso", 400
]
| sort by Location desc, UnitsSold desc
| extend Rank = row_rank_dense(UnitsSold, prev(Location) != Location)

Evaluate the following statements about the query results:

A. Litware from New York will be displayed at the top of the result set

B. Fabrikam in Seattle will have value = 2 in the ‘Rank’ column

C. Litware in San Francisco will have the same value in the ‘Rank’ column as Litware in New York

Which combination of answers is correct?

Choose the correct answer from the options below.

Explanations for each answer:

Learn more about KQL row ranking functions:
KQL Row Ranking Functions
Next Question
Discuss this question on social media: