Skip to content

Dev question 1029: gold orders ASC for 'highest' — returns the 4 slowest teams #38

Description

@headinthebox

Question 1029 (european_football_2, moderate):

What are the speed in which attacks are put together of the top 4 teams with the highest build Up Play Speed?

Its own evidence annotation agrees on the direction:

highest build up play speed refers to MAX(buildUpPlaySpeed)

But the gold SQL orders ascending:

SELECT t1.buildUpPlaySpeed FROM Team_Attributes AS t1
INNER JOIN Team AS t2 ON t1.team_api_id = t2.team_api_id
ORDER BY t1.buildUpPlaySpeed ASC LIMIT 4

so it returns the four lowest values — [20, 20, 20, 23] on a scale where fast build-up play is high. The question and its evidence both ask for the top of the scale; the fix is DESC.

(Found while evaluating a query engine against the released dev set; happy to provide anything further.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions