Schema
orders
One row per customer order, holding its latest status and total.
student_ro:SELECT
Columns#
| Column | Type | Nullable | Notes |
|---|---|---|---|
id | bigint | No | Primary key. |
user_id | bigint | No | References users.id. |
status | text | No | One of Cancelled, Complete, Processing, Returned, Shipped. |
total_amount | numeric(12,2) | No | Order total in USD. |
created_at | timestamptz | No | When the row was created. Indexed. |
updated_at | timestamptz | No | When the row was last modified. Equals created_at until the row changes. May not be indexed. |
Example query#
SQL
SELECT id, user_id, status, total_amount, updated_at
FROM orders
WHERE updated_at >= '2026-03-01'
AND updated_at < '2026-03-02'
ORDER BY updated_at, id;Loading tips#
Filter on updated_at for incremental loads — see Incremental loading.
© 2026 StyleHub · Developer Platform