Source
FOCUS 1.0 sample
Result rows
97
Status
Adapted to v1.0
Execution
PrecomputedRead-only
Result snapshot (UTC)
2026-10-11

Compares list, billed, effective, and contracted discounts per account and service, zeroing list/contracted cost on zero-billed commitment-covered usage to retain the source double-counting guard. ServiceProviderName uses the v1.0 producer for marketplace sellers and the normalized provider for direct services; discounts are percentage points and can be NULL or negative in this sample.

Column adaptations (1)
  • ServiceProviderName → publisher_name / provider_name: Use publisher_name when it differs from invoice_issuer_name (the sample marketplace sellers); otherwise normalize the direct provider to provider_name. PublisherName identifies the producer in v1.0, preserving ServiceProviderName seller semantics for this sample.

List vs effective cost by service

Chart controls and notes

Showing the first 20 categories. Open full screen to explore all 97 categories.

Query results
Service provider nameBilling account idBilling account nameBilling currencyService nameTotal effective costTotal billed costTotal list costContracted discountEffective discount
AWS1234567890123SunBirdUSDAmazon Elastic Compute Cloud$214.00$593.44$621.8866.3965.59
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDVirtual Machines$188.30$168.24$168.240.06-11.92
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure SQL Database$149.04$149.04$149.0400
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDSQL Database$108.73$108.73$108.7300
Datadog Inc.1234567890123SunBirdUSDDatadog$40.32$40.98$40.981.621.62
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure App Service$35.98$35.98$35.9800
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Synapse Analytics$30.25$30.25$30.250.020
AWS1234567890123SunBirdUSDAmazonCloudWatch$23.00$33.49$33.4931.3231.32
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDMicrosoft.Fabric$19.28$19.28$19.2800
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDStorage Accounts$17.46$17.46$17.46-0.490
Oracle20209880–USDCOMPUTE$16.00$17.31$2.26–-607.03
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDVirtual Network$13.09$13.09$13.0900
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Load Testing$10.00$10.00$10.0000
AWS1234567890123SunBirdUSDAmazon Relational Database Service$9.00$65.51$65.5186.2686.26
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Monitor$8.75$8.75$8.7500
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Kubernetes Service$8.36$8.36$8.3600
AWS1234567890123SunBirdUSDAmazon Elastic File System$8.00$9.54$9.5416.1316.13
AWS1234567890123SunBirdUSDAWS Config$6.00$5.51$5.51-8.99-8.99
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Machine Learning$5.05$5.05$5.0500
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Container Instances$5.02$5.02$5.0200
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure ExpressRoute$4.19$4.19$4.1900
AWS1234567890123SunBirdUSDAmazon Elastic Container Service for Kubernetes$4.00$9.10$9.1056.0656.06
AWS1234567890123SunBirdUSDAmazon Simple Storage Service$4.00$6.62$6.6239.5539.55
AWS1234567890123SunBirdUSDElastic Load Balancing$3.00$18.17$18.1783.4983.49
Oracle20209880–USDOPENSEARCH$3.00$2.60$2.60–-15.38
Oracle20209880–USDODSP$2.00$2.49$2.49–19.62
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Private Link$1.85$1.85$1.8500
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDMicrosoft Defender for Cloud$0.65$0.65$0.6523.110
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Container Registry$0.17$0.17$0.1700
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Site Recovery$0.16$0.16$0.1600
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDKey Vault$0.02$0.02$0.020.250
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure DNS$0.02$0.02$0.020.710
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDApplication Gateway$0.00146$0.00146$0.0014600
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDLogic Apps$0.00025$0.00025$0.0002500
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDEvent Grid$0.0000726$0.0000726$0.00007261000
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Data Factory$0.00003$0.00003$0.000031000
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDService Bus$0.00000205$0.00000205$0.000002051000
AWS1234567890123SunBirdUSDAmazon API Gateway$0.00$0.13$0.13100100
AWS1234567890123SunBirdUSDAmazon DevOps Guru$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAmazon DocumentDB (with MongoDB compatibility)$0.00$1.06$1.06100100
AWS1234567890123SunBirdUSDAmazon DynamoDB$0.00$0.22$0.22100100
AWS1234567890123SunBirdUSDAmazon EC2 Container Registry (ECR)$0.00$0.27$0.27100100
AWS1234567890123SunBirdUSDAmazon Elastic Container Registry Public$0.00$0.52$0.52100100
AWS1234567890123SunBirdUSDAmazon Elastic Container Service$0.00$6.70$6.66100100
AWS1234567890123SunBirdUSDAmazon ElastiCache$0.00$2.45$2.45100100
AWS1234567890123SunBirdUSDAmazon Glacier$0.00$0.000000574$0.000000574100100
AWS1234567890123SunBirdUSDAmazon GuardDuty$0.00$0.43$0.43100100
AWS1234567890123SunBirdUSDAmazon Lightsail$0.00$0.34$0.34100100
AWS1234567890123SunBirdUSDAmazon Location Service$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAmazon OpenSearch Service$0.00$0.24$0.24100100
AWS1234567890123SunBirdUSDAmazon QuickSight$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAmazon Redshift$0.00$0.00018$0.00018100100
AWS1234567890123SunBirdUSDAmazon Route 53$0.00$0.00381$0.00381100100
AWS1234567890123SunBirdUSDAmazon Simple Email Service$0.00$0.07$0.07100100
AWS1234567890123SunBirdUSDAmazon Simple Notification Service$0.00$0.0000853$0.0000853100100
AWS1234567890123SunBirdUSDAmazon Simple Queue Service$0.00$0.22$0.22100100
AWS1234567890123SunBirdUSDAmazon WorkDocs$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAmazonWorkMail$0.00$0.04$0.04100100
AWS1234567890123SunBirdUSDAWS App Runner$0.00$0.00658$0.00658100100
AWS1234567890123SunBirdUSDAWS Backup$0.00$0.03$0.03100100
AWS1234567890123SunBirdUSDAWS CloudFormation$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAWS CloudTrail$0.00$0.000402$0.000402100100
AWS1234567890123SunBirdUSDAWS Data Transfer$0.00-$0.00957-$0.00957100100
AWS1234567890123SunBirdUSDAWS Glue$0.00$0.00$0.00––
AWS1234567890123SunBirdUSDAWS Key Management Service$0.00$0.53$0.53100100
AWS1234567890123SunBirdUSDAWS Secrets Manager$0.00$0.20$0.20100100
AWS1234567890123SunBirdUSDAWS Security Hub$0.00$0.43$0.43100100
AWS1234567890123SunBirdUSDAWS Step Functions$0.00$0.16$0.16100100
AWS1234567890123SunBirdUSDAWS Systems Manager$0.00$0.42$0.42100100
AWS1234567890123SunBirdUSDAWS Transfer Family$0.00$0.30$0.30100100
AWS1234567890123SunBirdUSDAWS WAF$0.00$0.21$0.21100100
AWS1234567890123SunBirdUSDAWS X-Ray$0.00$0.0037$0.0037100100
AWS1234567890123SunBirdUSDCloudWatch Events$0.00$0.02$0.02100100
AWS1234567890123SunBirdUSDSavings Plans for AWS Compute usage$0.00$2.32$2.3213.72100
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDApp Configuration$0.00$0.00$0.00––
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure File Sync$0.00$0.00$0.00––
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Savings Plan for Compute$0.00$0.00$0.00––
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDSQL Managed Instance$0.00$0.00$0.00––
Oracle20209880–USDBLOCK_STORAGE$0.00$0.27$0.27–100
Oracle20209880–USDFILESTORAGESERVICE$0.00$0.00000000002$0.00––
Oracle20209880–USDIDENTITY_AND_ACCESS_MANAGEMENT$0.00$0.06$0.06–100
Oracle20209880–USDNETWORK$0.00$0.00$0.00––
Oracle20209880–USDOBJECTSTORE$0.00$0.00$0.00––
Oracle20209880–USDOKE_CONTROL_PLANE$0.00$0.70$0.70–100
Oracle20209880–USDORACLE_STREAMING_SERVICE$0.00$0.0000538$0.0000538–100
Oracle20209880–USDORALB$0.00$0.11–––
Oracle20209880–USDTELEMETRY$0.00$0.00$0.00––
Oracle20209880––OBJECTSTORE$0.00$0.00$0.00––
Oracle20209880––ORACLE_STREAMING_SERVICE$0.00$0.00$0.00––
Red Hat Inc.1234567890123SunBirdUSDRed Hat OpenShift Service on AWS$0.00$3.42$3.42100100
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure Data Factory v2-$0.04-$0.04-$0.04-11.160
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDLoad Balancer-$1.39-$1.39-$1.3900
AWS1234567890123SunBirdUSDAmazon Virtual Private Cloud-$2.00$23.15$23.15108.64108.64
AWS1234567890123SunBirdUSDAWS Lambda-$2.00$3.52$3.53156.73156.73
AWS1234567890123SunBirdUSDAmazon CloudFront-$3.00$3.86$3.86177.68177.68
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDAzure DB for MySQL-$4.89-$4.89-$4.8900
Microsoft/providers/Microsoft.Billing/billingAccounts/8611537SunBirdUSDVirtual Machine Scale Sets-$12.75-$12.76-$12.7600.08

97 rows. Scroll inside the table to see more.

Precomputed result

Inspect Postgres SQL and original FOCUS SQL

Postgres SQL, as run

with aggregated_data as (
  select case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end as service_provider_name,
         billing_account_id as billing_account_id,
         billing_account_name as billing_account_name,
         billing_currency as billing_currency,
         service_name as service_name,
         sum(effective_cost) as total_effective_cost,
         sum(billed_cost) as total_billed_cost,
         sum(case when charge_category = 'Usage' and billed_cost = 0 and effective_cost <> 0 then 0::numeric else contracted_cost end) as total_contracted_cost,
         sum(case when charge_category = 'Usage' and billed_cost = 0 and effective_cost <> 0 then 0::numeric else list_cost end) as total_list_cost
  from focus.cost_and_usage
  where billing_period_start >= $1::timestamptz
    and billing_period_end < $2::timestamptz
    and charge_class is null
  group by service_provider_name, billing_account_id, billing_account_name, billing_currency, service_name
)
select service_provider_name as service_provider_name,
       billing_account_id as billing_account_id,
       billing_account_name as billing_account_name,
       billing_currency as billing_currency,
       service_name as service_name,
       total_effective_cost as total_effective_cost,
       total_billed_cost as total_billed_cost,
       total_list_cost as total_list_cost,
       (1 - total_contracted_cost / nullif(total_list_cost, 0)) * 100 as contracted_discount,
       (1 - total_effective_cost / nullif(total_list_cost, 0)) * 100 as effective_discount
from aggregated_data
order by total_effective_cost desc nulls last, service_provider_name, billing_account_id, billing_account_name nulls last, billing_currency nulls last, service_name
limit 500

Parameters: $1 = period_start, $2 = period_end_before

Original FOCUS SQL

WITH AggregatedData AS (
  SELECT
    ServiceProviderName,
    BillingAccountId,
    BillingAccountName,
    BillingCurrency,
    ServiceName,
    SUM(EffectiveCost) AS TotalEffectiveCost,
    SUM(BilledCost) AS TotalBilledCost,
    SUM(
      CASE
        WHEN ChargeCategory = 'Usage' AND BilledCost = 0 AND EffectiveCost <> 0
        THEN 0
        ELSE ContractedCost
      END
    ) AS TotalContractedCost,
    SUM(
      CASE
        WHEN ChargeCategory = 'Usage' AND BilledCost = 0 AND EffectiveCost <> 0
        THEN 0
        ELSE ListCost
      END
    ) AS TotalListCost
  FROM focus_data_table
  WHERE
    BillingPeriodStart >= ? AND BillingPeriodEnd < ? AND ChargeClass IS NULL
  GROUP BY
    ServiceProviderName,
    BillingAccountId,
    BillingAccountName,
    BillingCurrency,
    ServiceName
)
SELECT
  ServiceProviderName,
  BillingAccountId,
  BillingAccountName,
  BillingCurrency,
  ServiceName,
  TotalEffectiveCost,
  TotalBilledCost,
  TotalListCost,
  (1 - TotalContractedCost / NULLIF(TotalListCost, 0)) * 100 AS ContractedDiscount,
  (1 - TotalEffectiveCost / NULLIF(TotalListCost, 0)) * 100 AS EffectiveDiscount
FROM AggregatedData