OData / OData/AspNetCoreOData

Enhancement: Need Support for ROW_NUMBER() with PARTITION BY and ORDER BY

Open
#1,091 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Need support to have ROW_NUMBER() column with PARTITION BY and ORDER BY clause to be used along with $filter to retrieve specific entities based on the rank no. e.g. for the below schema you might be interested to retrieve the details of products having max price in each category.
Product {
Id: Number,
Name: String,
Category: String,
Price: Number
}

The URL can be something like:
https://<host>/odata...?$compute=rowNumber($select=Category;$orderby=Price desc) as row&$select=Id,Name,Category,Price&$filter=row eq 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the query handling for $compute, $filter, and rowNumber in this repository, then verify the example URL returns the highest-priced product per category. Done means supporting PARTITION BY and ORDER BY together with filtering on the computed rank.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.