- Use Cases
- Data Ingestion
- Verify discount accuracy for previously invoiced billing period
Verify discount accuracy for previously invoiced billing period
This query uses the Provider column. Provider is deprecated in v1.3 and will be removed in v1.4.
FOCUS Versions
v1.0
v1.1
v1.2
Context
FinOps Practitioners need to confirm that negotiated, live, and commitment-based discounts were correctly applied to charges in a closed billing period.
FOCUS SQL Query
SELECT
ProviderName,
BillingAccountId,
BillingAccountName,
BillingCurrency,
ServiceName,
SUM(EffectiveCost) AS TotalEffectiveCost,
SUM(ListCost) AS TotalListCost,
SUM(BilledCost) AS TotalBilledCost,
((SUM(ListCost) - SUM(EffectiveCost)) / NULLIF(SUM(ListCost), 0)) * 100 AS EffectiveDiscount
FROM focus_data_table
WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ?
AND ChargeClass != 'Correction'
GROUP BY
ProviderName,
BillingAccountId,
BillingAccountName,
BillingCurrency,
ServiceName