Customers
3
Unique customer rows in the demo dataset.
Ziex DB Example
query.zigThis page creates tables, seeds a few records, and renders aggregate metrics from a single query. The page handles orchestration and UI, while the SQL lives beside it in a small query module.
Customers
3
Unique customer rows in the demo dataset.
Orders
3
All inserted orders, regardless of status.
Paid Orders
2
Subset filtered directly in SQL.
Revenue
$76.+0
Summed from amount_cents.
It is meant to show a practical structure for DB-powered pages: keep the SQL in a local helper module, expose small query functions, and let the page focus on composing the result into UI.
customers and orders tables.The query also asks for the latest order timestamp so the page can display one more real field coming back from D1.