Report recurring charges for commitment-based discounts over a period
As a Finance person, I want to understand the recurring costs of commitment based discounts over a period of time to improve forecasting.
- Source
- FOCUS MCP snapshot
- FOCUS editions
- v1.0, v1.1, v1.2, v1.3, v1.4
- Queries
- 1
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
- Source
- FOCUS 1.0 sample
- Result rows
- 2
- Status
- Runs on sample
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Recurring commitment charges
2 rows. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select billing_period_start,
commitment_discount_id,
coalesce(commitment_discount_name, regexp_replace(commitment_discount_id, '^.*/', '')) as commitment_label,
commitment_discount_name,
commitment_discount_type,
charge_frequency,
sum(billed_cost) as total_billed_cost
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_start < $2::timestamptz
and charge_frequency = 'Recurring'
and commitment_discount_id is not null
group by 1, 2, 3, 4, 5, 6
order by billing_period_start, total_billed_cost desc nulls last, commitment_discount_id
limit 500Original FOCUS SQL
SELECT BillingPeriodStart, CommitmentDiscountId, CommitmentDiscountName, CommitmentDiscountType, ChargeFrequency, SUM(BilledCost) AS TotalBilledCost FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodStart < ? AND ChargeFrequency = 'Recurring' AND CommitmentDiscountId IS NOT NULL GROUP BY BillingPeriodStart, CommitmentDiscountId, CommitmentDiscountName, CommitmentDiscountType, ChargeFrequency
Columns used
Column names from the source use case.