Personas
Engineering, Product
Capabilities
Reporting & Analytics, Forecasting
Source
FOCUS 1.0 sample
Result rows
3
Status
Adapted to v1.0
Execution
PrecomputedRead-only
Result snapshot (UTC)
2026-10-11

Monthly effective cost by service for one application tag value. MONTH() becomes a YYYY-MM label so years are not merged. The sample's tag key is lowercase 'application' rather than 'Application'; the sample has one billing month, so each month is a series for month-over-month comparison.

Column adaptations (1)
  • Tags["Application"] → tags->>'application': Tag keys are user-defined and case-sensitive in jsonb; the sample uses the lowercase key.

Application cost by service and month

Query results
Billing monthService nameTotal effective cost
2026-03AmazonCloudWatch$21.00
2026-03Amazon API Gateway$0.00
2026-03AWS Lambda$0.00

3 rows. Scroll inside the table to see more.

Precomputed result

Inspect Postgres SQL and original FOCUS SQL

Postgres SQL, as run

select to_char(date_trunc('month', billing_period_start), 'YYYY-MM') as billing_month,
       service_name,
       sum(effective_cost) as total_effective_cost
from focus.cost_and_usage
where tags->>'application' = $1::text
  and charge_period_start >= $2::timestamptz
  and charge_period_end < $3::timestamptz
group by 1, 2
order by billing_month, total_effective_cost desc nulls last, service_name
limit 500

Parameters: $1 = application, $2 = period_start, $3 = period_end

Original FOCUS SQL

SELECT
  MONTH(BillingPeriodStart),
  ServiceName,
  SUM(EffectiveCost) AS TotalEffectiveCost
FROM focus_data_table
WHERE Tags["Application"] = ?
  AND ChargePeriodStart >= ? AND ChargePeriodEnd < ?
GROUP BY
  MONTH(BillingPeriodStart),
  ServiceName

Columns used

Column names from the source use case.

  • Billing Period Start
Read the source on focus.finops.org ↗