You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are currently no way of fetching stats grouped by a value other than pulling the entire database.
For example, it would be great to be able to fetch price counts per users, or average price per location, or price count per day, and so on...
In the upcoming challenge page, this would help
Rank users by price count (group by users)
Display number of contributions per day on a graph (group by date)
Proposed solution
Add a new GET /api/v1/prices/grouped_stats endpoint, with mandatory param group_by matching an existing field.
For example, GET /api/v1/prices/grouped_stats?group_by=date&size=2 would give
By default, results are ordered following the group_by parameter (here by date), but we could also add an optional param order_by to sort the result with one of the computed result.
For example, GET /api/v1/prices/grouped_stats?group_by=date&size=2&order_by=-price__count would give
Problem
There are currently no way of fetching stats grouped by a value other than pulling the entire database.
For example, it would be great to be able to fetch price counts per users, or average price per location, or price count per day, and so on...
In the upcoming challenge page, this would help
Proposed solution
Add a new
GET /api/v1/prices/grouped_stats
endpoint, with mandatory paramgroup_by
matching an existing field.For example,
GET /api/v1/prices/grouped_stats?group_by=date&size=2
would giveBy default, results are ordered following the
group_by
parameter (here by date), but we could also add an optional paramorder_by
to sort the result with one of the computed result.For example,
GET /api/v1/prices/grouped_stats?group_by=date&size=2&order_by=-price__count
would giveThe text was updated successfully, but these errors were encountered: