Source
FOCUS use-case SQL
Status
Not in v1.0 sample
Results
Not run
Mode
Read-only
Library snapshot (UTC)
2026-10-08

The query reads the v1.4 Invoice Detail dataset (InvoiceId, PaymentCurrencyInvoiceDetailId, PaymentCurrencyBilledCost), none of which exist in the v1.0 cost-and-usage sample.

Review the original SQL below and the required columns before using a newer FOCUS dataset.

Original FOCUS SQL
SELECT
  PaymentCurrencyInvoiceDetailId,
  SUM(BilledCost) AS TotalBilled_BillingCurrency,
  SUM(PaymentCurrencyBilledCost) AS TotalBilled_PaymentCurrency,
  SUM(PaymentCurrencyBilledCost) / NULLIF(SUM(BilledCost), 0) AS EffectiveExchangeRate
FROM InvoiceDetail
WHERE
  InvoiceId = ?
GROUP BY
  PaymentCurrencyInvoiceDetailId
ORDER BY
  PaymentCurrencyInvoiceDetailId