Skip to content

Commit

Permalink
[batch] Fix dedup billing project user resources audit (#13069)
Browse files Browse the repository at this point in the history
  • Loading branch information
jigold authored May 16, 2023
1 parent 211bff4 commit 6ad5f0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion batch/sql/dedup_billing_project_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async def audit_changes(db):

bad_bp_user_records = db.select_and_fetchall(
f'''
SELECT old.billing_project, old.`user`, old.resource_id, old.`usage`, new.`usage`, ABS(new.`usage` - old.`usage`) AS usage_diff
SELECT old.billing_project, old.`user`, old.deduped_resource_id, old.`usage`, new.`usage`, ABS(new.`usage` - old.`usage`) AS usage_diff
FROM (
SELECT billing_project, `user`, deduped_resource_id, CAST(COALESCE(SUM(`usage`), 0) AS SIGNED) AS `usage`
FROM aggregated_billing_project_user_resources_v2
Expand Down

0 comments on commit 6ad5f0e

Please sign in to comment.