Skip to content

Page 152, the ORDER BY in window function does not make sense #6

Closed
@shepard8

Description

@shepard8

Hello dear authors,

This is not an error stricto sensu, but on page 152, in the following query:

select category, row_number() over w, title, last_value(title) over w
from posts WINDOW w as (partition by category order by category) order by category;

The first order by category does not make sense. I believe putting it in the erratum or updating the query in the code of chapter 5 would mislead the reader, but maybe you want to note this somewhere for a future second edition?

I guess your initial intent was to put order by title there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions