THE LINUX FOUNDATION PROJECTS
Docs navigation
On this page

    Analyze costs by service name

    This query uses the Provider column. Provider is deprecated in v1.3 and will be removed in v1.4.

    FOCUS Versions

    v1.0 v1.1 v1.2

    Context

    Analyzing service-level spending trends over a time period can expose expected and unexpected growth in the consumption of a cloud service, and is a good way for the FinOps team to prioritize usage and rate optimization conversations with product, engineering, and finance leaders within the organization.

    FOCUS SQL Query

    SELECT
      BillingPeriodStart,
      ProviderName,
      SubAccountId,
      SubAccountName,
      ServiceName,
      SUM(BilledCost) AS MonthlyCost,
      SUM(EffectiveCost) AS TotalEffectiveCost
    FROM focus_data_table
    WHERE ServiceName = ?
      AND BillingPeriodStart >= ? AND BillingPeriodStart < ?
    GROUP BY
      BillingPeriodStart,
      ProviderName,
      SubAccountId,
      SubAccountName,
      ServiceName
    ORDER BY MonthlyCost DESC

    FOCUS Datasets

    FOCUS Columns