Source
FOCUS use-case SQL
Status
Not in v1.0 sample
Results
Not run
Mode
Read-only
Library snapshot (UTC)
2026-10-08

The v1.0 sample lacks SkuPriceDetails, including its CoreCount and InstanceSeries properties, so average effective cost per core cannot be calculated.

Review the original SQL below and the required columns before using a newer FOCUS dataset.

Original FOCUS SQL
SELECT
    ServiceProviderName,
    ServiceName,
    PricingUnit,
    RegionName,
    JSON_UNQUOTE(JSON_EXTRACT(SkuPriceDetails, '$.InstanceSeries')) AS InstanceSeries, 
    SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(SkuPriceDetails, '$.CoreCount')) AS UNSIGNED)) AS TotalCoreCount,
    CASE 
        WHEN SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(SkuPriceDetails, '$.CoreCount')) AS UNSIGNED)) > 0 
        THEN SUM(EffectiveCost) / SUM(CAST(JSON_UNQUOTE(JSON_EXTRACT(SkuPriceDetails, '$.CoreCount')) AS UNSIGNED))
        ELSE NULL
    END AS AverageEffectiveCoreCost
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd  < ?
AND JSON_CONTAINS_PATH(SkuPriceDetails, 'all', '$.CoreCount', '$.InstanceSeries')
GROUP BY
    ServiceProviderName,
    ServiceName,
    PricingUnit,
    RegionName,
    InstanceSeries

Columns used

Column names from the source use case.

  • Service Provider Name
  • Service Name
  • Pricing Unit
  • Region Name
  • SKU Price Details
  • Charge Period Start
  • Charge Period End
  • Effective Cost
Read the source on focus.finops.org ↗