This query uses the Provider column. Provider is deprecated in v1.3 and will be removed in v1.4.

Personas
FinOps Practitioner
Capabilities
Rate Optimization
KPIs
Percentage of Commitment Discount Waste, Percent of Compute Spend Covered by Commitment Discounts, Effective Savings Rate Percentage, Effective Average Compute Cost per Core
Source
FOCUS 1.0 sample
Result rows
2
Status
Adapted to v1.0
Execution
PrecomputedRead-only
Result snapshot (UTC)
2026-10-11

Lists commitment discount purchases with their period, account, type, charge frequency and billed cost; the sample has two AWS Compute Savings Plans with recurring purchase fees. CommitmentDiscountUnit and CommitmentDiscountQuantity (v1.1+) are dropped; charge_description is added (one value per commitment) to give each plan a readable label.

Column adaptations (2)
  • CommitmentDiscountUnit → : Not in FOCUS v1.0; omitted.
  • CommitmentDiscountQuantity → : Not in FOCUS v1.0; omitted. pricing_quantity is not an equivalent (it measures the hourly fee, not the committed amount).

Commitment purchases

Query results
Charge period startCharge period endProvider nameBilling account idCommitment discount idCommitment discount typeCharge descriptionCharge frequencyTotal billed cost
2026-03-10 11:002026-03-16 11:00AWS1234567890123arn:aws:savingsplans::961082193871:savingsplan/493f5705-db1c-4867-8e5c-ee9a66fa6d3fSavings Plan1 year No Upfront Compute Savings PlanRecurring$2.32
2026-03-11 14:002026-03-11 15:00AWS1234567890123arn:aws:savingsplans::365499461711:savingsplan/37985e61-4fcb-4023-9dd7-e524c80342a2Savings Plan1 year All Upfront Compute Savings PlanRecurring$0.00

2 rows. Scroll inside the table to see more.

Precomputed result

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 as 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 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 500

Parameters: $1 = period_start, $2 = period_end

Original FOCUS SQL

SELECT
  MIN(ChargePeriodStart) AS ChargePeriodStart,
  MAX(ChargePeriodEnd) AS ChargePeriodEnd,
  ProviderName,
  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
  ProviderName,
  BillingAccountId,
  CommitmentDiscountId,
  CommitmentDiscountType,
  CommitmentDiscountUnit,
  CommitmentDiscountQuantity,
  ChargeFrequency

Columns used

Column names from the source use case.

  • Provider Name
  • Billing Account ID
  • Commitment Discount ID
  • Commitment Discount Type
  • Charge Frequency
  • Billed Cost
  • Charge Period Start
  • Charge Period End
  • Charge Category
  • Commitment Discount Unit
  • Commitment Discount Quantity
Read the source on focus.finops.org ↗