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

Totals billed cost per invoice issuer and invoice so it can be reconciled against provider invoices. v1.0 has no InvoiceId, so the invoice is identified by billing account, billing period and currency; individual invoice documents (e.g. separate credit memos) cannot be distinguished.

Column adaptations (1)
  • InvoiceId → billing_account_id, billing_period_start, billing_currency: An invoice issuer bills one invoice per billing account, billing period and currency; this approximates the invoice grain.

Billed cost per invoice issuer

Query results
Invoice issuer nameBilling account idBilling period startBilling currencyTotal billed cost
Amazon Web Services, Inc.12345678901232026-03-01USD$813.26
Microsoft/providers/Microsoft.Billing/billingAccounts/86115372026-03-01USD$567.21
Oracle202098802026-03-01USD$23.53
Amazon Web Services Canada, Inc.12345678901232026-03-01USD$12.97
Amazon Web Services EMEA SARL12345678901232026-03-01USD$7.37
Oracle202098802026-04-01USD$2.55
Oracle202098802026-03-01–$0.00
Oracle202098802026-04-01–$0.00

8 rows. Scroll inside the table to see more.

Precomputed result

Inspect Postgres SQL and original FOCUS SQL

Postgres SQL, as run

select invoice_issuer_name as invoice_issuer_name,
       billing_account_id as billing_account_id,
       billing_period_start as billing_period_start,
       billing_currency as billing_currency,
       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 invoice_issuer_name, billing_account_id, billing_period_start, billing_currency
order by total_billed_cost desc nulls last, invoice_issuer_name, billing_account_id
limit 500

Parameters: $1 = period_start, $2 = period_end

Original FOCUS SQL

SELECT 
    InvoiceIssuerName,
    InvoiceId,
    SUM(BilledCost) AS TotalBilledCost
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd  < ?
GROUP BY
    InvoiceIssuerName,
    InvoiceId