Report service costs by providers subaccount
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.
- Source
- FOCUS MCP snapshot
- FOCUS editions
- v1.3, v1.4
- Queries
- 2
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Report service costs by providers subaccount v1.3
Adapted to v1.0- Source
- FOCUS 1.0 sample
- Result rows
- 64
- Status
- Adapted to v1.0
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Column adaptations (1)
Subaccount service costs over time
64 rows. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end as service_provider_name,
service_name,
sub_account_id,
charge_period_start,
sum(effective_cost) as total_effective_cost
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_end < $2::timestamptz
and sub_account_id = $3::text
and case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end = $4::text
group by 1, 2, 3, 4
order by charge_period_start, total_effective_cost desc nulls last, service_name
limit 500Original FOCUS SQL
SELECT ServiceProviderName, ServiceName, SubAccountId, ChargePeriodStart, SUM(EffectiveCost) AS TotalEffectiveCost FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ? AND SubAccountId = ? AND ServiceProviderName = ? GROUP BY ServiceProviderName, ServiceName, SubAccountId, ChargePeriodStart ORDER BY SUM(EffectiveCost), BillingPeriodStart DESC
Report service costs by providers subaccount v1.4
Adapted to v1.0- Source
- FOCUS 1.0 sample
- Result rows
- 64
- Status
- Adapted to v1.0
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Column adaptations (1)
Subaccount effective cost by service
64 rows. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end as service_provider_name,
service_name as service_name,
sub_account_id as sub_account_id,
charge_period_start as charge_period_start,
sum(effective_cost) as total_effective_cost
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_end < $2::timestamptz
and sub_account_id = $3::text
and (case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end) = $4::text
group by 1, 2, 3, 4
order by charge_period_start, total_effective_cost desc nulls last, service_name nulls last
limit 500Original FOCUS SQL
SELECT ServiceProviderName, ServiceName, SubAccountId, ChargePeriodStart, SUM(EffectiveCost) AS TotalEffectiveCost FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ? AND SubAccountId = ? AND ServiceProviderName = ? GROUP BY ServiceProviderName, ServiceName, SubAccountId, ChargePeriodStart ORDER BY SUM(EffectiveCost), BillingPeriodStart DESC
Columns used
Column names from the source use case.