Report commitment discount purchases
Tracking and reconciling commitment-based discount purchases across service providers is a key to success for FinOps.
- Source
- FOCUS MCP snapshot
- FOCUS editions
- v1.3, v1.4
- Queries
- 1
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Report commitment discount purchases v1.3
Adapted to v1.0- Source
- FOCUS 1.0 sample
- Result rows
- 2
- Status
- Adapted to v1.0
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Column adaptations (2)
Commitment purchases
2 rows. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select min(charge_period_start) as charge_period_start,
max(charge_period_end) as charge_period_end,
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 as billing_account_id,
commitment_discount_id as commitment_discount_id,
commitment_discount_type as commitment_discount_type,
charge_description as charge_description,
charge_frequency as charge_frequency,
sum(billed_cost) as total_billed_cost
from focus.cost_and_usage
where charge_period_start >= $1::timestamptz
and charge_period_end < $2::timestamptz
and charge_category = 'Purchase'
and commitment_discount_id is not null
group by service_provider_name, billing_account_id, commitment_discount_id, commitment_discount_type, charge_description, charge_frequency
order by total_billed_cost desc nulls last, commitment_discount_id
limit 500Original FOCUS SQL
SELECT MIN(ChargePeriodStart) AS ChargePeriodStart, MAX(ChargePeriodEnd) AS ChargePeriodEnd, ServiceProviderName, BillingAccountId, CommitmentDiscountId, CommitmentDiscountType, CommitmentDiscountUnit, CommitmentDiscountQuantity, ChargeFrequency, SUM(BilledCost) AS TotalBilledCost FROM focus_data_table WHERE ChargePeriodStart >= ? AND ChargePeriodEnd < ? AND ChargeCategory = 'Purchase' AND CommitmentDiscountId IS NOT NULL GROUP BY ServiceProviderName, BillingAccountId, CommitmentDiscountId, CommitmentDiscountType, CommitmentDiscountUnit, CommitmentDiscountQuantity, ChargeFrequency
Columns used
Column names from the source use case.