Cash vs. Accrual Comparison by Billing Period
Highlights billing periods where the cash-based view (BilledCost) and the accrual-based view (EffectiveCost) diverge – typical of commitment discounts or prepaid purchases where billing timing differs from consumption. Returns periods where the absolute difference exceeds $0.01 to filter out rounding noise.
- Source
- FOCUS MCP snapshot
- FOCUS editions
- v1.4
- Queries
- 1
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Cash vs. Accrual Comparison by Billing Period
Adapted to v1.0- Source
- FOCUS 1.0 sample
- Result rows
- 8
- Status
- Adapted to v1.0
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Column adaptations (1)
Accrual minus cash by invoice issuer
8 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,
invoice_issuer_name as invoice_issuer_name,
billing_period_start as billing_period_start,
billing_period_end as billing_period_end,
sum(billed_cost) as total_billed_cost,
sum(effective_cost) as total_effective_cost,
sum(effective_cost) - sum(billed_cost) as cost_basis_difference
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_end < $2::timestamptz
group by 1, invoice_issuer_name, billing_period_start, billing_period_end
having abs(sum(effective_cost) - sum(billed_cost)) > 0.01
order by abs(sum(effective_cost) - sum(billed_cost)) desc, service_provider_name, invoice_issuer_name
limit 500Original FOCUS SQL
SELECT ServiceProviderName, InvoiceIssuerName, BillingPeriodStart, BillingPeriodEnd, SUM(BilledCost) AS TotalBilledCost, SUM(EffectiveCost) AS TotalEffectiveCost, SUM(EffectiveCost) - SUM(BilledCost) AS CostBasisDifference FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ? GROUP BY ServiceProviderName, InvoiceIssuerName, BillingPeriodStart, BillingPeriodEnd HAVING ABS(SUM(EffectiveCost) - SUM(BilledCost)) > 0.01
Columns used
Column names from the source use case.