- Use Cases
- Budgeting
- Calculate consumption of virtual currency within a billing period
Calculate consumption of virtual currency within a billing period
This query uses the ProviderName column. ProviderName is deprecated in v1.3 and will be removed in v1.4.
FOCUS Versions
v1.2
Context
Track virtual-currency burn throughout the billing period to forecast exhaustion dates and stay within budget.
FOCUS SQL Query
SELECT
ProviderName,
SUM(PricingCurrencyEffectiveCost) AS TotalPricingCurrencyEffectiveCost
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd < ?
AND PricingCurrency = ?
AND ChargeCategory = 'Usage'
GROUP BY
ProviderName
ORDER BY TotalPricingCurrencyEffectiveCost DESC
LIMIT 10