Identify unused commitments
Identify all data in a time period where CommitmentDiscountStatus is ‘unused’ thus identifying commitments that aren’t used and enabling the Practitioner to take action on either selling the commitment (if able), working with other personas on a workload that could use the commitment, or performing informed ignore (knowing it is there but ignoring it because there is nothing one can do).
- Source
- FOCUS MCP snapshot
- FOCUS editions
- v1.0, v1.1, v1.2
- Queries
- 1
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
This query uses the ProviderName column. ProviderName is deprecated in v1.3 and will be removed in v1.4.
Identify unused commitments
Runs on sample- Source
- FOCUS 1.0 sample
- Result rows
- 1
- Status
- Runs on sample
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Unused commitment cost
1 row. 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,
provider_name,
billing_account_id,
commitment_discount_id,
coalesce(max(commitment_discount_name), regexp_replace(commitment_discount_id, '^.*/', '')) as commitment_label,
commitment_discount_type,
commitment_discount_status,
sum(billed_cost) as total_billed_cost,
sum(effective_cost) as total_effective_cost
from focus.cost_and_usage
where charge_period_start >= $1::timestamptz
and charge_period_end < $2::timestamptz
and commitment_discount_status = 'Unused'
group by provider_name, billing_account_id, commitment_discount_id, commitment_discount_type, commitment_discount_status
order by total_effective_cost desc nulls last, provider_name, commitment_discount_id
limit 500Original FOCUS SQL
SELECT MIN(ChargePeriodStart) AS ChargePeriodStart, MAX(ChargePeriodEnd) AS ChargePeriodEnd, ProviderName, BillingAccountId, CommitmentDiscountId, CommitmentDiscountType, CommitmentDiscountStatus, SUM(BilledCost) AS TotalBilledCost, SUM(EffectiveCost) AS TotalEffectiveCost FROM focus_data_table WHERE ChargePeriodStart >= ? AND ChargePeriodEnd < ? AND CommitmentDiscountStatus = 'Unused' GROUP BY ProviderName, BillingAccountId, CommitmentDiscountId, CommitmentDiscountType, CommitmentDiscountStatus
Columns used
Column names from the source use case.