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

Billed cost per billing account, billing period, service category and service for one service provider. ServiceProviderName (v1.3+) is derived from provider_name, or publisher_name for marketplace sellers. AWS (the default) has a single March 2026 billing period; Oracle also has an April 2026 period.

Column adaptations (1)
  • ServiceProviderName → case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end: v1.0 ProviderName for direct cloud services; v1.0 PublisherName for the marketplace sellers (Datadog, Red Hat) whose publisher differs from the invoice issuer, matching the v1.3+ seller semantics.

Billed cost by category and billing period

Query results
Service provider nameBilling account nameBilling account idBilling currencyBilling period startService categoryService nameTotal billed cost
AWSSunBird1234567890123USD2026-03-01ComputeAmazon Elastic Compute Cloud$499.88
AWSSunBird1234567890123USD2026-03-01StorageAmazon Elastic Compute Cloud$93.56
AWSSunBird1234567890123USD2026-03-01DatabasesAmazon Relational Database Service$65.51
AWSSunBird1234567890123USD2026-03-01Management and GovernanceAmazonCloudWatch$33.49
AWSSunBird1234567890123USD2026-03-01NetworkingAmazon Virtual Private Cloud$23.15
AWSSunBird1234567890123USD2026-03-01NetworkingElastic Load Balancing$18.17
AWSSunBird1234567890123USD2026-03-01StorageAmazon Elastic File System$9.54
AWSSunBird1234567890123USD2026-03-01OtherAmazon Elastic Container Service for Kubernetes$9.10
AWSSunBird1234567890123USD2026-03-01OtherAmazon Elastic Container Service$6.70
AWSSunBird1234567890123USD2026-03-01StorageAmazon Simple Storage Service$6.62
AWSSunBird1234567890123USD2026-03-01Management and GovernanceAWS Config$5.51
AWSSunBird1234567890123USD2026-03-01NetworkingAmazon CloudFront$3.86
AWSSunBird1234567890123USD2026-03-01ComputeAWS Lambda$3.52
AWSSunBird1234567890123USD2026-03-01DatabasesAmazon ElastiCache$2.45
AWSSunBird1234567890123USD2026-03-01ComputeSavings Plans for AWS Compute usage$2.32
AWSSunBird1234567890123USD2026-03-01DatabasesAmazon DocumentDB (with MongoDB compatibility)$1.06
AWSSunBird1234567890123USD2026-03-01IdentityAWS Key Management Service$0.53
AWSSunBird1234567890123USD2026-03-01ComputeAmazon Elastic Container Registry Public$0.52
AWSSunBird1234567890123USD2026-03-01SecurityAmazon GuardDuty$0.43
AWSSunBird1234567890123USD2026-03-01SecurityAWS Security Hub$0.43
AWSSunBird1234567890123USD2026-03-01Management and GovernanceAWS Systems Manager$0.42
AWSSunBird1234567890123USD2026-03-01ComputeAmazon Lightsail$0.34
AWSSunBird1234567890123USD2026-03-01MigrationAWS Transfer Family$0.30
AWSSunBird1234567890123USD2026-03-01OtherAmazon EC2 Container Registry (ECR)$0.27
AWSSunBird1234567890123USD2026-03-01DatabasesAmazon OpenSearch Service$0.24
AWSSunBird1234567890123USD2026-03-01IntegrationAmazon Simple Queue Service$0.22
AWSSunBird1234567890123USD2026-03-01DatabasesAmazon DynamoDB$0.22
AWSSunBird1234567890123USD2026-03-01SecurityAWS WAF$0.21
AWSSunBird1234567890123USD2026-03-01IdentityAWS Secrets Manager$0.20
AWSSunBird1234567890123USD2026-03-01ComputeAWS Step Functions$0.16
AWSSunBird1234567890123USD2026-03-01NetworkingAmazon API Gateway$0.13
AWSSunBird1234567890123USD2026-03-01Business ApplicationsAmazon Simple Email Service$0.07
AWSSunBird1234567890123USD2026-03-01Business ApplicationsAmazonWorkMail$0.04
AWSSunBird1234567890123USD2026-03-01StorageAWS Backup$0.03
AWSSunBird1234567890123USD2026-03-01IntegrationCloudWatch Events$0.02
AWSSunBird1234567890123USD2026-03-01OtherAWS App Runner$0.00658
AWSSunBird1234567890123USD2026-03-01NetworkingAmazon Route 53$0.00381
AWSSunBird1234567890123USD2026-03-01Developer ToolsAWS X-Ray$0.0037
AWSSunBird1234567890123USD2026-03-01Management and GovernanceAWS CloudTrail$0.000402
AWSSunBird1234567890123USD2026-03-01AnalyticsAmazon Redshift$0.00018
AWSSunBird1234567890123USD2026-03-01IntegrationAmazon Simple Notification Service$0.0000853
AWSSunBird1234567890123USD2026-03-01StorageAmazon Glacier$0.000000574
AWSSunBird1234567890123USD2026-03-01AnalyticsAmazon QuickSight$0.00
AWSSunBird1234567890123USD2026-03-01AnalyticsAWS Glue$0.00
AWSSunBird1234567890123USD2026-03-01Business ApplicationsAmazon WorkDocs$0.00
AWSSunBird1234567890123USD2026-03-01Developer ToolsAmazon DevOps Guru$0.00
AWSSunBird1234567890123USD2026-03-01Management and GovernanceAWS CloudFormation$0.00
AWSSunBird1234567890123USD2026-03-01WebAmazon Location Service$0.00
AWSSunBird1234567890123USD2026-03-01NetworkingAWS Data Transfer-$0.00957

49 rows. Scroll inside the table to see more.

Precomputed result

Inspect Postgres SQL and original FOCUS SQL

Postgres SQL, as run

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_name as billing_account_name,
       billing_account_id as billing_account_id,
       billing_currency as billing_currency,
       billing_period_start as billing_period_start,
       service_category as service_category,
       service_name as service_name,
       sum(billed_cost) as total_billed_cost
from focus.cost_and_usage
where charge_period_start >= $1::timestamptz
  and charge_period_end < $2::timestamptz
  and case when publisher_name is not null and publisher_name is distinct from invoice_issuer_name then publisher_name else provider_name end = $3::text
group by 1, billing_account_name, billing_account_id, billing_currency, billing_period_start, service_category, service_name
order by total_billed_cost desc nulls last, service_category, service_name
limit 500

Parameters: $1 = period_start, $2 = period_end, $3 = service_provider_name

Original FOCUS SQL

SELECT
ServiceProviderName,
BillingAccountName,
BillingAccountId,
BillingCurrency,
BillingPeriodStart,
ServiceCategory,
ServiceName,
SUM(BilledCost) AS TotalBilledCost
FROM focus_data_table
WHERE ChargePeriodStart >= ? and ChargePeriodEnd < ?
AND ServiceProviderName = ?
GROUP BY
ServiceProviderName,
BillingAccountName,
BillingAccountId,
BillingCurrency,
BillingPeriodStart,
ServiceCategory,
ServiceName
ORDER BY TotalBilledCost DESC