Report application cost month over month
Inspect the result, its parameters and the SQL behind it.
- Source
- FOCUS use-case library
- Data
- FOCUS 1.0 sample
- Status
- Adapted to v1.0
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Loading sample results
Inspect the result, its parameters and the SQL behind it.
3 rows. Scroll inside the table to see more.
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 500SELECT MONTH(BillingPeriodStart), ServiceName, SUM(EffectiveCost) AS TotalEffectiveCost FROM focus_data_table WHERE Tags["Application"] = ? AND ChargePeriodStart >= ? AND ChargePeriodEnd < ? GROUP BY MONTH(BillingPeriodStart), ServiceName