> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaantonio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query curated data

> Use the stable reporting tables for everyday shipment and delivery questions.

Curated views are the least-friction path. Use them for dashboards, recurring reports, and anyone who is not hunting through discovery fields.

## Start with shipments

`reporting.shipments` is one current row per Forwarding Shipment job for your organization.

Useful columns:

* `job_number` — the CargoWise job number people recognize in operations
* `shipment_key` — join key for history tables
* `transport_mode`, `origin_code`, `destination_code`
* `total_weight`, `total_volume`, `goods_description`
* `first_seen_at`, `last_seen_at`, `updated_at`

```sql theme={null}
SELECT
  job_number,
  transport_mode,
  origin_code,
  destination_code,
  total_weight,
  total_volume
FROM reporting.shipments
WHERE transport_mode = 'AIR'
ORDER BY job_number;
```

## Related curated views

| View                             | Use it for                       |
| -------------------------------- | -------------------------------- |
| `reporting.shipment_versions`    | Historical versions of a job     |
| `reporting.shipment_changes`     | When the current version changed |
| `reporting.cargowise_payloads`   | Payload metadata                 |
| `reporting.cargowise_deliveries` | Delivery receipt metadata        |
| `reporting.cargowise_messages`   | Classified message envelopes     |

Join history with `shipment_key`:

```sql theme={null}
SELECT
  shipments.job_number,
  count(changes.id) AS accepted_version_changes,
  max(changes.changed_at) AS latest_change_at
FROM reporting.shipments AS shipments
LEFT JOIN reporting.shipment_changes AS changes
  ON changes.shipment_key = shipments.shipment_key
GROUP BY shipments.shipment_key, shipments.job_number
ORDER BY latest_change_at DESC NULLS LAST;
```

## Browse the contract in Lambda

Open **Settings → Analytics** and expand **Reporting**. That section lists the supported views and columns for your organization.

The same list is documented in [Reporting views](/analytics/reporting-views).

## When curated data is not enough

If the column you need is not on `shipments`, do not assume the value is missing from Analytics.

1. Search [Discover fields](/analytics/discover-fields).
2. If the field is present in observations and becomes a permanent report need, ask Jaantonio to evaluate promoting it into a curated table.
3. Some business concepts need a different upstream feed before they can appear as curated columns. Operations Rep, Post Date, and Revenue are examples of that today.

## Practical guidance

<Tip>
  Prefer `job_number` in business-facing filters and exports. Keep `shipment_key` for joins. Use
  curated tables for Power BI overview pages. Leave discovery observations for field hunting and
  detail work, not for every visual on a busy dashboard.
</Tip>
