Source
FOCUS 1.0 sample
Result rows
2
Status
Runs on sample
Execution
PrecomputedRead-only
Result snapshot (UTC)
2026-10-11

Recurring billed charges for commitment-based discounts per billing period. The sample has three recurring AWS Savings Plan purchase rows on two plans; commitment_label (name, or the last segment of the ID) is added for chart labels.

Recurring commitment charges

Query results
Billing period startCommitment discount idCommitment labelCommitment discount nameCommitment discount typeCharge frequencyTotal billed cost
2026-03-01arn:aws:savingsplans::961082193871:savingsplan/493f5705-db1c-4867-8e5c-ee9a66fa6d3f493f5705-db1c-4867-8e5c-ee9a66fa6d3f–Savings PlanRecurring$2.32
2026-03-01arn:aws:savingsplans::365499461711:savingsplan/37985e61-4fcb-4023-9dd7-e524c80342a237985e61-4fcb-4023-9dd7-e524c80342a2–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 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 500

Parameters: $1 = billing_period_start, $2 = billing_period_start_before

Original 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