Source
FOCUS 1.0 sample
Result rows
5
Status
Adapted to v1.0
Execution
PrecomputedRead-only
Result snapshot (UTC)
2026-10-11

Lists the billing accounts with charges in the period by service provider. BillingAccountType (v1.2+) is not in v1.0 and is omitted; subaccount count and billed cost are added so the list can be charted. The sample has one billing account per provider, and some have no name.

Column adaptations (2)
  • ServiceProviderName → case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end: v1.3 replaced ProviderName with ServiceProviderName (the seller in marketplace scenarios). v1.0 ProviderName supplies it for direct-provider charges; PublisherName supplies it for the observed AWS Marketplace sellers (Datadog, Red Hat) where it differs from InvoiceIssuerName. Same expression as the other v1.3 catalog entries.
  • BillingAccountType → (omitted): Introduced in v1.2; v1.0 has no equivalent column, so the account type cannot be shown.

Subaccounts per billing account

Query results
Service provider nameBilling account idBilling account nameSub account countTotal billed cost
AWS1234567890123SunBird86$789.21
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBird11$567.21
Oracle20209880–4$26.08
Datadog Inc.1234567890123SunBird1$40.98
Red Hat Inc.1234567890123SunBird1$3.42

5 rows. Scroll inside the table to see more.

Precomputed result

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,
       billing_account_id,
       billing_account_name,
       count(distinct sub_account_id) as sub_account_count,
       sum(billed_cost) as total_billed_cost
from focus.cost_and_usage
where charge_period_start >= $1::timestamptz
  and charge_period_end < $2::timestamptz
group by 1, 2, 3
order by sub_account_count desc, service_provider_name, billing_account_id
limit 500

Parameters: $1 = period_start, $2 = period_end

Original FOCUS SQL

SELECT DISTINCT
    ServiceProviderName,
    BillingAccountID,
    BillingAccountName,
    BillingAccountType
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd  < ?