Closed cqvu closed 3 years ago
Mock for how to do it in SQLAlchemy (with SQL code):
SELECT * FROM points p LEFT JOIN users u ON u.id = p.assignee WHERE u.role=${user_to_query};
where the user to query is a get parameter from the endpoint call
I should note that we have to then aggregate on the p.amount column
In order to do this for multiple pods, we remove the WHERE clause and instead use the GROUP BY p.role
part of the call.
Then wrap this up nicely in a JSON object to be consumed by the front end.
Task(s)
Acceptance Criteria
Dependencies
Resources
Notes