THE LINUX FOUNDATION PROJECTS
Docs navigation
On this page

    Analyze cost per compute service for a subaccount

    FOCUS Versions

    v1.0 v1.1 v1.2 v1.3 v1.4

    Context

    Compute spend tends to be the largest component of spend in most cloud bills. Drilling into the resource-level view of cost for a given day can provide a detailed view of the heaviest spending compute resources, including a view of which time periods the consumption was at its highest level.

    FOCUS SQL Query

    SELECT
      Min(ChargePeriodStart),
      Max(ChargePeriodEnd),
      ServiceName,
      ResourceId,
      ResourceName,
      SUM(PricingQuantity),
      SUM(EffectiveCost) AS MonthlyEffectiveCost
    FROM focus_data_table
    WHERE SubAccountId = ?
      AND ServiceCategory = 'Compute'
      AND ChargePeriodStart >= ? and ChargePeriodEnd  < ?
    GROUP BY
      ServiceName,
      ResourceId,
      ResourceName
    ORDER BY MonthlyEffectiveCost DESC

    FOCUS Datasets

    FOCUS Columns