Skip to content

Commit

Permalink
dont aggregate across job groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ehigham authored Aug 6, 2024
1 parent 08e7f6f commit be26ba3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion batch/batch/front_end/query/query_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ def parse_list_batches_query_v2(user: str, q: str, last_batch_id: Optional[int])
WITH resource_costs AS (
SELECT resource_id, CAST(COALESCE(SUM(`usage`), 0) AS SIGNED) AS `usage`
FROM aggregated_job_group_resources_v3
WHERE batch_id = batches.id
WHERE batch_id = batches.id
AND job_group_id = job_groups.job_group_id
GROUP BY resource_id
)
SELECT COALESCE(SUM(`usage` * rate), 0) AS cost
Expand Down

0 comments on commit be26ba3

Please sign in to comment.