- Use Cases
- Reporting & Analytics
- Report service costs by providers subaccount
Report service costs by providers subaccount
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
Organizations wants to negotiate private pricing for a particular workload, a subaccount that carries specialized workloads, or their entire footprint. The cost metric used must amortize up-front and recurring fees to get an accurate view of the effective cost.
FOCUS SQL Query
SELECT
ProviderName,
ServiceName,
SubAccountId,
ChargePeriodStart,
SUM(EffectiveCost) AS TotalEffectiveCost
FROM focus_data_table
WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ?
AND SubAccountId = ?
AND ProviderName = ?
GROUP BY
ProviderName,
ServiceName,
SubAccountId,
ChargePeriodStart
ORDER BY
SUM(EffectiveCost),
BillingPeriodStart DESC