Explorar o código

Remove extra group by args for query (#2863) (#2864)

Signed-off-by: Sean Holcomb <seanholcomb@gmail.com>
Sean Holcomb hai 1 ano
pai
achega
b1921fa783
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      pkg/cloud/gcp/bigqueryintegration.go

+ 2 - 2
pkg/cloud/gcp/bigqueryintegration.go

@@ -181,7 +181,7 @@ func (bqi *BigQueryIntegration) queryFlexibleCUDTotalCosts(start time.Time, end
 		  IFNULL(SUM((Select SUM(amount) FROM bd.credits)),0),
 		FROM %s
 		WHERE %s
-		GROUP BY usage_date, sku.description
+		GROUP BY usage_date
 	`
 
 	table := fmt.Sprintf(" `%s` bd ", bqi.GetBillingDataDataset())
@@ -214,7 +214,7 @@ func (bqi *BigQueryIntegration) queryFlexibleCUDTotalCredits(start time.Time, en
 	FROM %s
 	CROSS JOIN UNNEST(bd.credits) AS credits
 	WHERE %s
-	GROUP BY usage_date, credits.id
+	GROUP BY usage_date
 	`
 
 	table := fmt.Sprintf(" `%s` bd ", bqi.GetBillingDataDataset())