Compare billed cost per subaccount to budget
Inspect the result, its parameters and the SQL behind it.
- Source
- FOCUS use-case library
- Data
- FOCUS 1.0 sample
- Status
- Runs on sample
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Loading sample results
Inspect the result, its parameters and the SQL behind it.
1 row. Scroll inside the table to see more.
select provider_name as provider_name,
sub_account_id as sub_account_id,
sub_account_name as sub_account_name,
sum(billed_cost) as total_billed_cost
from focus.cost_and_usage
where charge_category = 'Usage'
and charge_period_start >= $1::timestamptz
and charge_period_end <= $2::timestamptz
and provider_name = $3::text
and sub_account_id = $4::text
group by provider_name, sub_account_id, sub_account_name
order by provider_name, sub_account_id, sub_account_name nulls last
limit 500SELECT ProviderName, SubAccountId, SubAccountName, SUM(BilledCost) AS TotalBilledCost FROM focus_data_table WHERE ChargeCategory = 'Usage' AND ChargePeriodStart >= ? and ChargePeriodEnd <= ? AND ProviderName = ? AND SubAccountId = ? GROUP BY ProviderName, SubAccountId, SubAccountName