AdventureWorks Chat-Based Reporting

Ask Microsoft's canonical sales warehouse a question. Two frontier LLMs — Azure OpenAI and Claude — generate the T-SQL, the warehouse runs it, and you get the answer as a table, a chart, and a sentence or two of prose. Same question, two models — see for yourself how they compare.

The data is the public AdventureWorksDW2022 sample — a fictional bike company's sales from 2010–2014. Every query is validated to be a single SELECT against the allowed tables before it hits the database. The model can't write, drop, or read anything outside the warehouse.

What is AdventureWorksDW?

Microsoft's canonical sales-warehouse sample. A fictional bike company (Adventure Works Cycles) selling 2010–2014, with ~60K internet orders, ~60K reseller orders, and 700 dimension tables. Denormalized star schema — joins are cheap, queries are forgiving.

Fact tables (what happened)
  • FactInternetSales— Direct-to-consumer orders
  • FactResellerSales— Wholesale channel
  • FactProductInventory— Daily snapshots
  • FactCallCenter— Daily call-center ops
Dimensions (the who / what / where / when)
  • DimDate— Calendar — join on OrderDateKey
  • DimCustomer— 18K end-customers, demographics
  • DimProduct + Subcategory + Category— SKU catalog
  • DimSalesTerritory— Region / Country / Group
  • DimReseller— ~700 wholesale accounts
  • DimEmployee— Salespeople (with hierarchy)
  • DimGeography— Cities / states / countries
  • DimPromotion, DimCurrency, DimAccount— Lookups

Years in the data: 2010–2014. Currency: USD-equivalent via DimCurrency.

Chat backend not configured.
Set NEXT_PUBLIC_ADVENTUREWORKS_FUNCTION_URL in the Amplify environment, redeploy, and the chat will come online.