Skip to content

Commit

Permalink
Group by lineitem_usagetype
Browse files Browse the repository at this point in the history
It’s not possible to use an aggregation in a GROUP BY statement, so grouping by
the lineitem_usagetype is the closest I could think of. It may result in too
many distinct rows, though.
  • Loading branch information
samdoran committed Jun 20, 2024
1 parent 7949678 commit 5f78bed
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,12 @@ WHERE aws.source = {{aws_source_uuid}}
AND aws.resource_id_matched = TRUE
GROUP BY aws.lineitem_usagestartdate,
aws.lineitem_resourceid,
4, -- CASE satement
4, -- product_code
aws.product_productfamily,
aws.product_instancetype,
aws.lineitem_availabilityzone,
aws.product_region,
aws.lineitem_usagetype,
aws.resourcetags,
aws.costcategory
;
Expand Down Expand Up @@ -335,7 +336,7 @@ WHERE aws.source = {{aws_source_uuid}}
AND (aws.resource_id_matched = FALSE OR aws.resource_id_matched IS NULL)
GROUP BY aws.lineitem_usagestartdate,
aws.lineitem_resourceid,
4, -- CASE satement
4, -- product_code
aws.product_productfamily,
aws.product_instancetype,
aws.lineitem_availabilityzone,
Expand Down

0 comments on commit 5f78bed

Please sign in to comment.