THE LINUX FOUNDATION PROJECTS
Docs navigation
On this page

    Update budgets for each application

    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

    Finance manages tracking of budgets and must update application budgets with the actual costs billed each month so the budget is not exceeded.

    FOCUS SQL Query

    SELECT
      ProviderName,
      BillingPeriodStart,
      BillingPeriodEnd,
      Tags["Application"] AS Application,
      SUM(BilledCost) AS TotalBilledCost
    FROM focus_data_table
    WHERE BillingPeriodStart >= ? AND BillingPeriodEnd < ?
    GROUP BY
      ProviderName,
      BillingPeriodStart,
      BillingPeriodEnd,
      Tags["Application"]

    FOCUS Datasets

    FOCUS Columns