Skip to content

Implement per group row numbers rather than per result set row numbers #1126

Closed

Description

@jaengelberg

It can be very useful to be able to generate row numbers for each group, which lets you do things like return the first 1 or X rows per group, but the ROW_NUMBER() function in AlaSQL appears to return the row numbers not of the group but of the result set overall.

Activity

  1. mathiasrw commented on Sep 5, 2019

    @mathiasrw
    Member

    This would change existing behavour. We might need to make a new name for it - like GROUP_ROW_NUMBER() - how does that sound?

  2. jaengelberg commented on Sep 5, 2019

    @jaengelberg
    Author

    That sounds great, thank you!

  3. tppsDev commented on Sep 9, 2019

    @tppsDev

    Is anyone working on this?

  4. mathiasrw commented on Sep 11, 2019

    @mathiasrw
    Member

    Not that I know of. But its a neat feature. Not too hard to implement for a new person :-D

  5. biddwan09 commented on Oct 13, 2019

    @biddwan09
    Contributor

    Hi @mathiasrw . To implement I only have to make change in 424select.js right ? It would be great if you can give a bit more clarity on this feature

  6. mathiasrw commented on Oct 14, 2019

    @mathiasrw
    Member

    @jaengelberg Any chance you could come with an example that could work as the foundation for a test case?

    @biddwab09 Yes, I am pretty sure its only 424select.js - but I might be mistaken. Its a good place to start in any case :)

  7. added a commit that references this issue on Nov 20, 2025
    30bc356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions