THE LINUX FOUNDATION PROJECTS
Docs navigation
On this page

    Determine contracted savings by virtual currency

    FOCUS Versions

    v1.2 v1.3 v1.4

    Context

    Compare the virtual currency discounted rate to the virtual currency list price to determine the difference, as contracts can lower the virtual-currency price of certain operations.

    FOCUS SQL Query

    SELECT 
            ServiceName,
            ServiceSubcategory,
            ChargeDescription,
            BillingCurrency,
            PricingCurrency,
            SUM(PricingCurrencyListUnitPrice-PricingCurrencyContractedUnitPrice) AS ContractedSavingsInPricingCurrency,
            SUM(ListUnitPrice - ContractedUnitPrice) AS ContractedSavingsInBillingCurrency
    FROM focus_data_table
    WHERE ChargePeriodStart >= ? and ChargePeriodEnd  < ?
    AND PricingCurrencyListUnitPrice > PricingCurrencyContractedUnitPrice
    GROUP BY
            ServiceName,
            ServiceSubcategory,
            ChargeDescription,
            BillingCurrency,
            PricingCurrency

    FOCUS Datasets

    FOCUS Columns