Get historical usage and rates to enable cost forecasting
Inspect the result, its parameters and the SQL behind it.
- Source
- FOCUS use-case library
- Data
- FOCUS 1.0 sample
- Status
- Runs on sample
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
- Source
- FOCUS 1.0 sample
- Result rows
- 500
- Status
- Runs on sample
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Effective cost by billing period
Showing 100 of 500 rows. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select provider_name as provider_name,
billing_period_start as billing_period_start,
billing_period_end as billing_period_end,
service_category as service_category,
service_name as service_name,
region_id as region_id,
region_name as region_name,
pricing_unit as pricing_unit,
sum(effective_cost) as total_effective_cost,
sum(pricing_quantity) as total_pricing_quantity
from focus.cost_and_usage
where billing_period_start >= $1::timestamptz
and billing_period_end <= $2::timestamptz
group by provider_name, billing_period_start, billing_period_end, service_category, service_name, region_id, region_name, pricing_unit
order by abs(sum(effective_cost)) desc nulls last, billing_period_start, provider_name, service_name, region_id
limit 500Original FOCUS SQL
SELECT ProviderName, BillingPeriodStart, BillingPeriodEnd, ServiceCategory, ServiceName, RegionId, RegionName, PricingUnit, SUM(EffectiveCost) AS TotalEffectiveCost, SUM(PricingQuantity) AS TotalPricingQuantity FROM focus_data_table WHERE BillingPeriodStart >= ? AND BillingPeriodEnd <= ? GROUP BY ProviderName, BillingPeriodStart, BillingPeriodEnd, ServiceCategory, ServiceName, RegionId, RegionName, PricingUnit