hasura / hasura/graphql-engine
🧪 Scalability: The ability to aggregate "row_number" and "rank" by "count'.
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
Described what I'm trying to achieve here:
[https://github.com/hasura/graphql-engine/discussions/8923](https://github.com/hasura/graphql-engine/discussions/8923)
### Describe the solution you'd like
An easy way to run an aggregate that returns the `row_number()`, and `rank()`, over a value such as count, sum, etc. Absolutely essential when designing systems like leaderboards at scale.
### Describe alternatives you've considered
Tried getting the raw SQL query from "Analyze" and tinkering around with it, but couldn't get to a successful result. A built-in solution would save hours of work and help unlock an essential way to use Hasura aggregations at scale.

Contributor guide
Research direction
Start with the linked discussion #8923 and the raw SQL produced by Analyze, since no implementation files or tests are named. Determine how GraphQL aggregates currently represent count and sum, then define what exposing row_number() and rank() over those values would require; done means the requested leaderboard-style aggregate is available through the API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, sql
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100