# Which orders shipped later than their scheduled date?

> A real Claude session on a Fishbowl database (ILC's demo company, sample data), connected through ILC MCP for Fishbowl. The answer below is what the AI said; the queries are what it ran. Page: https://israellopezconsulting.com/fishbowl-mcp/questions/late-shipments

## Question

Which orders shipped later than their scheduled date?

### Answer

13 of the 41 shipped sales orders in the DEMO Fishbowl database went out after their scheduled date. Five of them were more than four months late and all shipped on the same day, July 15; the other eight were 1 to 4 days late.

| SO | Customer | Scheduled | Shipped | Days late |
|---|---|---|---|---|
| 1026 | Candie Walker | Jan 4 | Jul 15 | 192 |
| 1027 | Eric Washburn | Feb 4 | Jul 15 | 161 |
| 1029 | Baker Frontier | Feb 7 | Jul 15 | 158 |
| 1030 | Candie Walker | Feb 21 | Jul 15 | 144 |
| 1031 | Mark Bennett | Feb 28 | Jul 15 | 137 |
| 1043 | Mark Bennett | Jan 24 | Jan 28 | 4 |
| 1015 | Jim Raynor | May 31 | Jun 3 | 3 |
| 1044 | Mark Bennett | Jan 27 | Jan 29 | 2 |
| 1000 | Allen's Groceries | Apr 10 | Apr 11 | 1 |
| 1003 | Karen Smith | Apr 25 | Apr 26 | 1 |
| 1013 | Mountaineer Catering | May 28 | May 29 | 1 |
| 1042 | Eric Washburn | Jan 17 | Jan 18 | 1 |
| 1053 | Mark Bennett | Feb 2 | Feb 3 | 1 |

All dates are 2026. The five July 15 shipments look like a single batch (possibly a backlog cleared or demo data loaded that day) rather than five independent delays.

"Late" here means the shipment's ship date fell on a later calendar day than the line's scheduled fulfillment date. Orders that are overdue but still unshipped are not included.

## Behind the scenes

Every step the AI took, as recorded in the query log. All queries are read-only and row-capped.

1. Checked the saved queries — 6 saved queries
2. Looked up a table (ship) — 30 columns
3. Looked up a table (so) — 66 columns
4. Ran a read-only query: List sales orders whose shipments shipped after the scheduled fulfillment date, with days late — 13 rows, 220 ms

   ```sql
   SELECT so.num AS soNum, c.name AS customer, sh.num AS shipNum, DATE(MIN(si.dateScheduledFulfillment)) AS scheduledDate, DATE(sh.dateShipped) AS shippedDate, DATEDIFF(DATE(sh.dateShipped), DATE(MIN(si.dateScheduledFulfillment))) AS daysLate, COUNT(DISTINCT si.id) AS lateLines, DATE(so.dateFirstShip) AS soHeaderSchedDate
   FROM ship AS sh
   JOIN shipitem AS shi ON shi.shipId = sh.id
   JOIN soitem AS si ON si.id = shi.soItemId
   JOIN so ON so.id = si.soId
   JOIN customer AS c ON c.id = so.customerId
   WHERE sh.dateShipped IS NOT NULL AND si.dateScheduledFulfillment IS NOT NULL AND DATE(sh.dateShipped) > DATE(si.dateScheduledFulfillment)
   GROUP BY so.num, c.name, sh.num, sh.dateShipped, so.dateFirstShip
   ORDER BY daysLate DESC, so.num
   LIMIT 1001
   ```

5. Ran a read-only query: Count total shipped sales orders for context on late-shipment rate — 1 row, 263 ms

   ```sql
   SELECT COUNT(DISTINCT sh.id) AS shippedShipments, COUNT(DISTINCT so.id) AS shippedOrders, MIN(DATE(sh.dateShipped)) AS firstShip, MAX(DATE(sh.dateShipped)) AS lastShip
   FROM ship AS sh
   JOIN shipitem AS shi ON shi.shipId = sh.id
   JOIN soitem AS si ON si.id = shi.soItemId
   JOIN so ON so.id = si.soId
   WHERE sh.dateShipped IS NOT NULL
   LIMIT 101
   ```

Learn more: https://israellopezconsulting.com/fishbowl-mcp · More examples: https://israellopezconsulting.com/fishbowl-mcp/questions
