How do I confirm the amount of coverage for a specific tag for a provider
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
- 1
- Status
- Runs on sample
- Execution
- Precomputed
- Result snapshot (UTC)
- 2026-10-11
Tag coverage of effective cost
96.09%
Tagged ratio
1 row. Scroll inside the table to see more.
Inspect Postgres SQL and original FOCUS SQL
Postgres SQL, as run
select sum(case when tags -> $1::text is not null then effective_cost else 0 end) / nullif(sum(effective_cost), 0) as tagged_ratio,
sum(case when tags -> $1::text is not null then effective_cost else 0 end) as tagged_effective_cost,
sum(effective_cost) as total_effective_cost
from focus.cost_and_usage
where charge_period_start >= $2::timestamptz
and charge_period_end < $3::timestamptz
and effective_cost > 0
and provider_name = $4::textOriginal FOCUS SQL
SELECT
SUM(CASE
WHEN JSON_CONTAINS_PATH(tags, 'one', '$.?')
THEN EffectiveCost
ELSE 0
END) / SUM(EffectiveCost) * 100 AS TaggedPercentage
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd < ?
AND EffectiveCost > 0
AND ProviderName = ?