AspNetCoreOData
AspNetCoreOData copied to clipboard
Enhancement: Need Support for ROW_NUMBER() with PARTITION BY and ORDER BY
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