Ask a precise cost question.
The FOCUS use-case SQL, translated to Postgres. Open a query to inspect its result, adjust parameters and trace the answer back to the SQL.
- Source
- FOCUS use-case library
- Queries
- 118
- Data
- FOCUS 1.0 sample
- Mode
- Read-only
- Library snapshot (UTC)
- 2026-10-08
Default results are precomputed. Custom parameters query the database and may use cached results. Queries adapted from newer FOCUS columns show their mappings and limits.
- Run directly
- 33
- Adapted
- 49
- Need newer data
- 36
Run directly on the sample
33 queries
- Analyze cost per compute service for a subaccount
Analyze cost per compute service for a subaccount
- Analyze costs by availability zone for a subaccount
Analyze costs by availability zone for a subaccount
- Analyze costs by service name
Analyze costs by service name
- Analyze costs of components of a resource
Analyze costs of components of a resource
- Analyze marketplace vendors costs
Analyze marketplace vendors costs
- Analyze resource costs by SKU
Analyze the different metered costs for a particular SKU
- Analyze service costs by region
Analyze service costs by region
- Analyze service costs by subaccount
Analyze service costs by subaccount
- Analyze service costs month over month
Analyze service costs month over month
- Calculate Unit Economics
Calculate unit economics
- Compare billed cost per subaccount to budget
Compare billed cost per subaccount to budget
- Compare resource usage month over month
Compare resource usage month over month
- Determine Effective Savings Rate
Determine Effective Savings Rate
- Determine Effective Savings Rate by Service
Determine Effective Savings Rate by Service
- Determine Effective Savings Rate v1.3
Determine Effective Savings Rate
- Forecast amortized costs month over month based on historical trends
Forecast amortized costs month over month based on historical trends
- Forecast cashflow month over month based on historical trends by service
Forecast cashflow month over month based on historical trends by service
- Get historical usage and rates to enable cost forecasting
Get historical usage and rates to enable cost forecasting
- How do I confirm the amount of coverage for a specific tag for a provider
Analyze tag coverage
- Identify anomalous daily spending by subaccount
Identify anomalous daily spending by subaccount
- Identify anomalous daily spending by subaccount and region
Identify anomalous daily spending by subaccount and region
- Identify anomalous daily spending by subaccount, region, and service
Identify anomalous daily spending by subaccount, region, and service
- Identify unused commitments
Identify unused commitments
- Report costs by service category
Report costs by service category
- Report effective cost of compute
Report effective cost of compute
- Report recurring charges for commitment-based discounts over a period
Report recurring charges for commitment-based discounts over a period
- Report service costs by providers subaccount
Report service costs by providers subaccount
- Report spending across billing periods for a provider by service category
Report spending across billing periods for a provider by service category
- Report subaccounts by region
Report subaccounts by region
- Update budgets with billed costs
Update budgets with billed costs
- Verify accuracy of provider invoices
Verify Accuracy of Provider Invoices
- Verify accuracy of services charges across providers
Verify accuracy of services charges across providers
- Verify discount accuracy for previously invoiced billing period
Verify discount accuracy for previously invoiced billing period
Adapted to the v1.0 sample
49 queries
- Allocate multi-currency charges per application
Allocate multi-currency charges per application
- Allocate Multi-Currency Charges per Application v1.3
Allocate multi-currency charges per application
- Analyze Cost by Participating Entities
Analyze cost by participating entities
- Analyze costs by availability zone for a subaccount v1.3
Analyze costs by availability zone for a subaccount
- Analyze costs by service name v1.3
Analyze costs by service name
- Analyze Credit Memos
Analyze credit memos
- Analyze credit memos v1.3
Analyze credit memos
- Analyze marketplace vendors costs v1.3
Analyze marketplace vendors costs
- Analyze resource costs by SKU v1.3
Analyze resource costs by SKU
- Analyze service costs by region v1.3
Analyze service costs by region
- Analyze service costs month over month v1.3
Analyze service costs month over month
- Analyze tag coverage v1.4
Analyze tag coverage
- Analyze the different metered costs for a particular SKU
Breaks one SKU's quantity, list cost and effective cost down by charge period, SKU price and list unit price. SkuMeter does not exist in v1.0 and is dropped; SkuPriceId still separates the SKU's price tiers. Default SKU A86N9S7CGUKZHH8P (CloudFront data transfer out) shows a paid $0.12/GB tier next to the free tier; effective cost is whole-dollar rounded in this sample, so the chart uses list cost.
- Analyze the different metered costs for a particular SKU v1.3
Analyze the different metered costs for a particular SKU
- Cash vs. Accrual Comparison by Billing Period
Cash vs. Accrual Comparison by Billing Period
- Commitment Discount Effective Cost Breakdown
Commitment Discount Effective Cost Breakdown
- Compare Billed Cost per Subaccount to Budget v1.3
Compare billed cost per subaccount to budget
- Compare Resource Usage Month over Month v1.3
Compare resource usage month over month
- Determine Effective Savings Rate by Service v1.3
Determine Effective Savings Rate by Service
- Discount Effectiveness by Service
Discount Effectiveness by Service
- Effective Cost by Service and Region
Effective Cost by Service and Region
- Forecast amortized costs month over month based on historical trends v1.3
Forecast amortized costs month over month based on historical trends
- Forecast Cashflow Month Over Month Based on Historical Trends by Service v1.3
Forecast cashflow month over month based on historical trends by service
- Get Historical Usage and Rates to Enable Cost Forecasting v1.3
Get historical usage and rates to enable cost forecasting
- Identify anomalous daily spending by subaccount and region v1.3
Identify anomalous daily spending by subaccount and region
- Identify anomalous daily spending by subaccount v1.3
Identify anomalous daily spending by subaccount
- Identify anomalous daily spending by subaccount, region, and service v1.3
Identify anomalous daily spending by subaccount, region, and service
- Identify Sources of Billed Cost
Identify sources of billed cost
- Identify sources of billed cost v1.3
Identify sources of billed cost
- Identify Unused Commitments v1.3
Identify unused commitments
- Report application cost month over month
Report application cost month over month
- Report commitment discount purchases
Report commitment discount purchases
- Report commitment discount purchases v1.3
Report commitment discount purchases
- Report costs by service category v1.3
Report costs by service category
- Report effective cost of compute v1.3
Report effective cost of compute
- Report service costs by providers subaccount v1.3
Report service costs by providers subaccount
- Report service costs by providers subaccount v1.4
Report service costs by providers subaccount
- Report spending across billing periods for a service provider by service category v1.3
Report spending across billing periods for a service provider by service category
- Report Subaccounts by Region v1.3
Report subaccounts by region
- Track Marketplace Purchases Across Providers
Track marketplace purchases across providers
- Understand the Billing Account or Sub Account Entity
Understand the billing account or sub account entity
- Understand the Billing Account or Sub Account Entity v1.3
Understand the billing account or sub account entity
- Update budgets for each application
Update budgets for each application
- Update budgets for each application v1.3
Update budgets for each application
- Update budgets with billed costs v1.3
Update budgets with billed costs
- Verify Accuracy of Provider Invoices aka Invoice Reconciliation
Verify accuracy of provider invoices aka invoice reconciliation
- Verify Accuracy of Service Provider Invoices v1.3
Verify accuracy of service provider invoices
- Verify Accuracy of Services Charges Across Service Providers v1.3
Verify accuracy of services charges across service providers
- Verify discount accuracy for a previously invoiced billing period (corrections excluded) v1.3
Verify discount accuracy for a previously invoiced billing period (corrections excluded)
Need data beyond the v1.0 sample
36 queries
- Analyze capacity reservations on compute costs
CapacityReservationId and CapacityReservationStatus are absent from the v1.0 sample, so compute charges cannot be classified as used, unused or non-reserved capacity.
- Analyze capacity reservations on compute costs v1.3
CapacityReservationId and CapacityReservationStatus are absent from the v1.0 sample, so compute charges cannot be classified by capacity-reservation usage.
- Analyze Effective Cost by Pricing Currency
PricingCurrency and PricingCurrencyEffectiveCost are absent from the v1.0 sample, so effective cost cannot be expressed in the pricing currency.
- Analyze effective cost by pricing currency v1.3
The v1.0 sample lacks PricingCurrency and PricingCurrencyEffectiveCost, so BillingCurrency and EffectiveCost cannot reproduce pricing-denominated costs or exchange-rate effects.
- Analyze Purchase of Virtual Currency
No virtual-currency Purchase charges exist in the sample: the only Purchase rows have PricingUnit Hours and are AWS Savings Plan purchases.
- Analyze Purchase of Virtual Currency v1.3
The sample contains no virtual-currency Purchase charges: its only Purchase rows are three AWS Compute Savings Plan fees priced in Hours, so the PricingUnit filter has no virtual-currency unit to select.
- Analyze Purchase of Virtual Currency v1.4
No virtual-currency Purchase charges are present in the sample: the only Purchase rows have PricingUnit Hours and describe AWS Compute Savings Plans.
- Analyze Total Cost by Allocated Resource
AllocatedMethodId, AllocatedResourceId and AllocatedResourceName (v1.3+ allocation columns) are absent from the v1.0 sample, so allocated-resource costs cannot be derived.
- Calculate Average Rate of a Component Resource
SkuPriceDetails (with its CoreCount and InstanceSeries properties) is absent from the v1.0 sample, so effective cost per core cannot be computed.
- Calculate average rate of a component resource v1.3
The v1.0 sample lacks SkuPriceDetails, including its CoreCount and InstanceSeries properties, so average effective cost per core cannot be calculated.
- Calculate Commitment Discount Coverage Rate with Eligibility-Adjusted Denominator
CommitmentProgramEligibilityDetails (v1.4) is absent from the v1.0 sample, so the eligibility-adjusted denominator of uncovered-but-eligible usage cannot be computed.
- Calculate Consumption of Virtual Currency Within a Billing Period
PricingCurrency and PricingCurrencyEffectiveCost (introduced in FOCUS v1.2) are absent from the v1.0 sample.
- Calculate consumption of virtual currency within a billing period v1.3
PricingCurrency and PricingCurrencyEffectiveCost are absent from the v1.0 sample, so consumption denominated in a virtual currency cannot be measured.
- Compare Commitment Opportunities Across Providers (Cross-Provider with SaaS)
CommitmentProgramEligibilityDetails (FOCUS v1.4) is absent from the v1.0 sample, so eligible program types and eligible cost cannot be derived.
- Determine Contracted Savings by Virtual Currency
PricingCurrency, PricingCurrencyListUnitPrice, PricingCurrencyContractedUnitPrice and ServiceSubcategory are absent from the v1.0 sample, so savings in a virtual pricing currency cannot be computed.
- Determine Target of Virtual Currency Usage
PricingCurrency and PricingCurrencyEffectiveCost (introduced in FOCUS v1.2) are absent from the v1.0 sample.
- Determine target of virtual currency usage v1.3
PricingCurrency and PricingCurrencyEffectiveCost (and HostProviderName) are absent from the v1.0 sample, so virtual-currency consumption cannot be attributed to services.
- Identify Eligible Capacity Reservation Spend
CommitmentProgramEligibilityDetails (with its CommitmentPrograms ProgramType entries) and CapacityReservationStatus are absent from the v1.0 sample, so capacity-reservation-eligible spend cannot be identified.
- Identify Eligible Uncovered Spend by Program Type
CommitmentProgramEligibilityDetails is absent from the v1.0 sample, so eligible program types and eligible uncovered spend cannot be determined.
- Identify Resources With Shared Cost Allocation
AllocatedMethodId (v1.3+ allocation column) is absent from the v1.0 sample, so resources with shared cost allocation cannot be identified.
- Identify unused capacity reservations
CapacityReservationId and CapacityReservationStatus are absent from the v1.0 sample, so unused capacity reservations cannot be identified.
- Identify unused capacity reservations v1.3
CapacityReservationId and CapacityReservationStatus (v1.1+) are absent from the v1.0 sample, so unused capacity reservations cannot be identified.
- Join Contract Commitment Details With Usage Charges
ContractApplied and the Contract Commitment dataset fields ContractCommitmentId, ContractCommitmentCategory, ContractCommitmentPeriodStart, ContractCommitmentPeriodEnd, and ContractCommitmentCost are absent from the v1.0 sample.
- Quantify Usage of a Component Resource
SkuPriceDetails (FOCUS v1.2+, holding CoreCount and InstanceSeries) is absent from the v1.0 sample.
- Quantify usage of a component resource v1.3
SkuPriceDetails (with its CoreCount and InstanceSeries properties) is absent from the v1.0 sample, so core counts by instance series cannot be summed.
- Reconcile Cost and Usage to Invoice Detail by Invoice ID
InvoiceId and the separate Invoice Detail dataset containing InvoiceId and BilledCost are absent from the v1.0 sample, preventing invoice-level reconciliation.
- Reconcile Multi-Currency Settlement using Lineage IDs
The query reads the v1.4 Invoice Detail dataset (InvoiceId, PaymentCurrencyInvoiceDetailId, PaymentCurrencyBilledCost), none of which exist in the v1.0 cost-and-usage sample.
- Report corrections by subaccount for a previously invoiced billing period
The sample contains no ChargeClass = 'Correction' rows (ChargeClass is null throughout), so corrections to previously invoiced billing periods cannot be reported by subaccount.
- Report corrections by subaccount for a previously invoiced billing period v1.3
ChargeClass is null on every row of the v1.0 sample, so there are no 'Correction' charges to report for any billing period.
- Report corrections for a previously invoiced billing period
The sample contains no ChargeClass = 'Correction' records, so corrections to previously invoiced billing periods cannot be reported.
- Report corrections for a previously invoiced billing period v1.3
The sample contains no ChargeClass = 'Correction' rows (ChargeClass is null throughout), so the query returns nothing meaningful.
- Report costs by service category and subcategory
ServiceSubcategory is absent from the v1.0 sample (it was added in FOCUS v1.1), so costs cannot be reported at the service-subcategory grain.
- Report costs by service category and subcategory v1.3
ServiceSubcategory is absent from the v1.0 sample, so billed costs cannot be reported at the requested service-subcategory grain.
- Report on Initial Contract Commitments
ContractApplied and its ContractCommitmentID / ContractCommitmentAppliedCost elements are absent from the v1.0 sample, so contract-commitment purchases cannot be reported.
- Track Contract Commitment Burn-Down Over Time
ContractApplied and its ContractCommitmentID / ContractCommitmentAppliedCost elements are absent from the v1.0 sample, so contract-commitment burn-down cannot be tracked.
- Validate Tax Variance
The Invoice Detail dataset and InvoiceId are absent from the v1.0 sample, so tax and service amounts cannot be totalled per invoice.