# Expected result tables

Frozen from the separate CSV/Python/Decimal reference calculation, then compared with actual SQLite outputs. Same author, separate computational method—not external independent review. NULL is displayed explicitly; no rows means an empty result, not a missing file. Tables describe the exact supplied fixtures only.

## Fixture: base

### u01_inventory

| booking_rows | booking_refs | booked_seats |
| --- | --- | --- |
| 10 | 8 | 14 |

### u02_open_sessions

| session_id | topic | site | starts_on | capacity |
| --- | --- | --- | --- | --- |
| 101 | Repair | North | 2026-09-03 | 6 |
| 102 | Repair | South | 2026-09-04 | 4 |
| 103 | Design | North | 2026-09-10 | 5 |
| 105 | Repair | North | 2026-09-17 | 4 |
| 106 | Design | South | 2026-09-18 | 3 |

### u02_large_bookings

| reg_id | session_id | seats |
| --- | --- | --- |
| 1001 | 101 | 2 |
| 1004 | 102 | 2 |
| 1005 | 102 | 2 |
| 1007 | 103 | 2 |

### u02_date_window

| session_id | starts_on |
| --- | --- |
| 101 | 2026-09-03 |
| 102 | 2026-09-04 |
| 103 | 2026-09-10 |

### u02_fee_display

| reg_id | fee_cents | fee_cad |
| --- | --- | --- |
| 1001 | 1200 | 12.0 |
| 1004 | 1200 | 12.0 |
| 1005 | 1200 | 12.0 |
| 1007 | 1200 | 12.0 |
| 1002 | 600 | 6.0 |
| 1003 | 600 | 6.0 |
| 1008 | 600 | 6.0 |
| 1009 | 600 | 6.0 |
| 1010 | 600 | 6.0 |
| 1006 | 0 | 0.0 |

### u03_missing_attendance

| reg_id | session_id | seats |
| --- | --- | --- |
| 1003 | 101 | 1 |
| 1007 | 103 | 2 |

### u03_quality_counts

| booking_rows | recorded_attendance_rows | unknown_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- |
| 10 | 8 | 2 | 8 |

### u03_duplicate_intake

| reg_id | intake_rows |
| --- | --- |
| 9001 | 2 |

### u03_invalid_intake

| ingest_id | reg_id | seats | attended |
| --- | --- | --- | --- |
| 4 | NULL | 1 | NULL |
| 5 | 9003 | 0 | 0 |
| 6 | 9004 | 1 | 2 |

### u04_session_totals

| session_id | booking_rows | booked_seats | recorded_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- | --- |
| 101 | 3 | 4 | 2 | 2 |
| 102 | 2 | 4 | 2 | 3 |
| 103 | 2 | 3 | 1 | 1 |
| 105 | 3 | 3 | 3 | 2 |

### u04_known_rates

| session_id | attended_seats | known_booked_seats | known_attendance_pct |
| --- | --- | --- | --- |
| 101 | 2 | 3 | 66.67 |
| 102 | 3 | 4 | 75.0 |
| 103 | 1 | 1 | 100.0 |
| 105 | 2 | 3 | 66.67 |

### u04_having

| session_id | booked_seats |
| --- | --- |
| 101 | 4 |
| 102 | 4 |

### u04_empty_summary

| booking_rows | booked_seats | mean_booking_size |
| --- | --- | --- |
| 0 | NULL | NULL |

### u06_attendance_bands

| reg_id | attendance_band |
| --- | --- |
| 1001 | all recorded |
| 1002 | none recorded |
| 1003 | unknown |
| 1004 | partial |
| 1005 | all recorded |
| 1006 | all recorded |
| 1007 | unknown |
| 1008 | all recorded |
| 1009 | none recorded |
| 1010 | all recorded |

### u06_session_report

| session_id | status | capacity | booking_rows | booked_seats | unknown_seats | known_seats | recorded_attended_seats |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 101 | open | 6 | 3 | 4 | 1 | 3 | 2 |
| 102 | open | 4 | 2 | 4 | 0 | 4 | 3 |
| 103 | open | 5 | 2 | 3 | 2 | 1 | 1 |
| 104 | cancelled | 0 | 0 | 0 | 0 | 0 | NULL |
| 105 | open | 4 | 3 | 3 | 0 | 3 | 2 |
| 106 | open | 3 | 0 | 0 | 0 | 0 | NULL |

### u06_above_mean

| reg_id | seats |
| --- | --- |
| 1001 | 2 |
| 1004 | 2 |
| 1005 | 2 |
| 1007 | 2 |

### u06_orphans

| ingest_id | reg_id | session_id |
| --- | --- | --- |
| 3 | 9002 | 999 |

### u07_bounds

| booking_rows | booked_seats | recorded_attended_seats | unknown_seats | known_seats | known_attendance_pct | lower_pct | upper_pct |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 10 | 14 | 8 | 3 | 11 | 72.73 | 57.14 | 78.57 |

### u07_capacity

| open_capacity | booked_open_seats | booking_capacity_pct |
| --- | --- | --- |
| 22 | 14 | 63.64 |

### u08_controls

| sessions | booking_rows | booked_seats | fee_cents | raw_intake_rows |
| --- | --- | --- | --- | --- |
| 6 | 10 | 14 | 7800 | 6 |

### u08_project_session_report

| session_id | status | capacity | booking_rows | booked_seats | known_seats | unknown_seats | recorded_attended_seats | booking_capacity_pct | lower_attendance_pct | upper_attendance_pct |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 101 | open | 6 | 3 | 4 | 3 | 1 | 2 | 66.67 | 50.0 | 75.0 |
| 102 | open | 4 | 2 | 4 | 4 | 0 | 3 | 100.0 | 75.0 | 75.0 |
| 103 | open | 5 | 2 | 3 | 1 | 2 | 1 | 60.0 | 33.33 | 100.0 |
| 104 | cancelled | 0 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL |
| 105 | open | 4 | 3 | 3 | 3 | 0 | 2 | 75.0 | 66.67 | 66.67 |
| 106 | open | 3 | 0 | 0 | 0 | 0 | 0 | 0.0 | NULL | NULL |

### u08_fee_sanity

| booking_rows | fee_cents | wrong_distinct_fee_cents | mean_fee_cad |
| --- | --- | --- | --- |
| 10 | 7800 | 1800 | 7.8 |

## Fixture: independent

### u01_inventory

| booking_rows | booking_refs | booked_seats |
| --- | --- | --- |
| 5 | 4 | 7 |

### u02_open_sessions

| session_id | topic | site | starts_on | capacity |
| --- | --- | --- | --- | --- |
| 201 | Design | North | 2026-10-02 | 3 |
| 202 | Repair | South | 2026-10-03 | 2 |
| 203 | Repair | North | 2026-10-09 | 4 |

### u02_large_bookings

| reg_id | session_id | seats |
| --- | --- | --- |
| 2003 | 202 | 2 |
| 2004 | 203 | 2 |

### u02_date_window

| session_id | starts_on |
| --- | --- |

**No rows returned.**

### u02_fee_display

| reg_id | fee_cents | fee_cad |
| --- | --- | --- |
| 2003 | 500 | 5.0 |
| 2004 | 500 | 5.0 |
| 2001 | 250 | 2.5 |
| 2002 | 250 | 2.5 |
| 2005 | 0 | 0.0 |

### u03_missing_attendance

| reg_id | session_id | seats |
| --- | --- | --- |
| 2002 | 201 | 1 |

### u03_quality_counts

| booking_rows | recorded_attendance_rows | unknown_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- |
| 5 | 4 | 1 | 4 |

### u03_duplicate_intake

| reg_id | intake_rows |
| --- | --- |
| 9101 | 2 |

### u03_invalid_intake

| ingest_id | reg_id | seats | attended |
| --- | --- | --- | --- |
| 14 | NULL | 1 | NULL |
| 15 | 9103 | 0 | 0 |
| 16 | 9104 | 1 | 2 |

### u04_session_totals

| session_id | booking_rows | booked_seats | recorded_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- | --- |
| 201 | 2 | 2 | 1 | 1 |
| 202 | 1 | 2 | 1 | 0 |
| 203 | 2 | 3 | 2 | 3 |

### u04_known_rates

| session_id | attended_seats | known_booked_seats | known_attendance_pct |
| --- | --- | --- | --- |
| 201 | 1 | 1 | 100.0 |
| 202 | 0 | 2 | 0.0 |
| 203 | 3 | 3 | 100.0 |

### u04_having

| session_id | booked_seats |
| --- | --- |

**No rows returned.**

### u04_empty_summary

| booking_rows | booked_seats | mean_booking_size |
| --- | --- | --- |
| 0 | NULL | NULL |

### u06_attendance_bands

| reg_id | attendance_band |
| --- | --- |
| 2001 | all recorded |
| 2002 | unknown |
| 2003 | none recorded |
| 2004 | all recorded |
| 2005 | all recorded |

### u06_session_report

| session_id | status | capacity | booking_rows | booked_seats | unknown_seats | known_seats | recorded_attended_seats |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 201 | open | 3 | 2 | 2 | 1 | 1 | 1 |
| 202 | open | 2 | 1 | 2 | 0 | 2 | 0 |
| 203 | open | 4 | 2 | 3 | 0 | 3 | 3 |
| 204 | cancelled | 0 | 0 | 0 | 0 | 0 | NULL |

### u06_above_mean

| reg_id | seats |
| --- | --- |
| 2003 | 2 |
| 2004 | 2 |

### u06_orphans

| ingest_id | reg_id | session_id |
| --- | --- | --- |
| 13 | 9102 | 999 |

### u07_bounds

| booking_rows | booked_seats | recorded_attended_seats | unknown_seats | known_seats | known_attendance_pct | lower_pct | upper_pct |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 5 | 7 | 4 | 1 | 6 | 66.67 | 57.14 | 71.43 |

### u07_capacity

| open_capacity | booked_open_seats | booking_capacity_pct |
| --- | --- | --- |
| 9 | 7 | 77.78 |

### u08_controls

| sessions | booking_rows | booked_seats | fee_cents | raw_intake_rows |
| --- | --- | --- | --- | --- |
| 4 | 5 | 7 | 1500 | 6 |

### u08_project_session_report

| session_id | status | capacity | booking_rows | booked_seats | known_seats | unknown_seats | recorded_attended_seats | booking_capacity_pct | lower_attendance_pct | upper_attendance_pct |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 201 | open | 3 | 2 | 2 | 1 | 1 | 1 | 66.67 | 50.0 | 100.0 |
| 202 | open | 2 | 1 | 2 | 2 | 0 | 0 | 100.0 | 0.0 | 0.0 |
| 203 | open | 4 | 2 | 3 | 3 | 0 | 3 | 75.0 | 100.0 | 100.0 |
| 204 | cancelled | 0 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL |

### u08_fee_sanity

| booking_rows | fee_cents | wrong_distinct_fee_cents | mean_fee_cad |
| --- | --- | --- | --- |
| 5 | 1500 | 750 | 3.0 |

## Fixture: changed

### u01_inventory

| booking_rows | booking_refs | booked_seats |
| --- | --- | --- |
| 3 | 3 | 4 |

### u02_open_sessions

| session_id | topic | site | starts_on | capacity |
| --- | --- | --- | --- | --- |
| 301 | Repair | North | 2026-11-01 | 4 |
| 302 | Design | South | 2026-11-02 | 2 |
| 303 | Design | North | 2026-11-03 | 3 |

### u02_large_bookings

| reg_id | session_id | seats |
| --- | --- | --- |
| 3003 | 302 | 2 |

### u02_date_window

| session_id | starts_on |
| --- | --- |

**No rows returned.**

### u02_fee_display

| reg_id | fee_cents | fee_cad |
| --- | --- | --- |
| 3003 | 500 | 5.0 |
| 3001 | 250 | 2.5 |
| 3002 | 250 | 2.5 |

### u03_missing_attendance

| reg_id | session_id | seats |
| --- | --- | --- |
| 3003 | 302 | 2 |

### u03_quality_counts

| booking_rows | recorded_attendance_rows | unknown_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- |
| 3 | 2 | 1 | 1 |

### u03_duplicate_intake

| reg_id | intake_rows |
| --- | --- |

**No rows returned.**

### u03_invalid_intake

| ingest_id | reg_id | seats | attended |
| --- | --- | --- | --- |

**No rows returned.**

### u04_session_totals

| session_id | booking_rows | booked_seats | recorded_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- | --- |
| 301 | 2 | 2 | 2 | 1 |
| 302 | 1 | 2 | 0 | NULL |

### u04_known_rates

| session_id | attended_seats | known_booked_seats | known_attendance_pct |
| --- | --- | --- | --- |
| 301 | 1 | 2 | 50.0 |

### u04_having

| session_id | booked_seats |
| --- | --- |

**No rows returned.**

### u04_empty_summary

| booking_rows | booked_seats | mean_booking_size |
| --- | --- | --- |
| 0 | NULL | NULL |

### u06_attendance_bands

| reg_id | attendance_band |
| --- | --- |
| 3001 | all recorded |
| 3002 | none recorded |
| 3003 | unknown |

### u06_session_report

| session_id | status | capacity | booking_rows | booked_seats | unknown_seats | known_seats | recorded_attended_seats |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 301 | open | 4 | 2 | 2 | 0 | 2 | 1 |
| 302 | open | 2 | 1 | 2 | 2 | 0 | NULL |
| 303 | open | 3 | 0 | 0 | 0 | 0 | NULL |

### u06_above_mean

| reg_id | seats |
| --- | --- |
| 3003 | 2 |

### u06_orphans

| ingest_id | reg_id | session_id |
| --- | --- | --- |

**No rows returned.**

### u07_bounds

| booking_rows | booked_seats | recorded_attended_seats | unknown_seats | known_seats | known_attendance_pct | lower_pct | upper_pct |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 3 | 4 | 1 | 2 | 2 | 50.0 | 25.0 | 75.0 |

### u07_capacity

| open_capacity | booked_open_seats | booking_capacity_pct |
| --- | --- | --- |
| 9 | 4 | 44.44 |

### u08_controls

| sessions | booking_rows | booked_seats | fee_cents | raw_intake_rows |
| --- | --- | --- | --- | --- |
| 3 | 3 | 4 | 1000 | 0 |

### u08_project_session_report

| session_id | status | capacity | booking_rows | booked_seats | known_seats | unknown_seats | recorded_attended_seats | booking_capacity_pct | lower_attendance_pct | upper_attendance_pct |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 301 | open | 4 | 2 | 2 | 2 | 0 | 1 | 50.0 | 50.0 | 50.0 |
| 302 | open | 2 | 1 | 2 | 0 | 2 | 0 | 100.0 | 0.0 | 100.0 |
| 303 | open | 3 | 0 | 0 | 0 | 0 | 0 | 0.0 | NULL | NULL |

### u08_fee_sanity

| booking_rows | fee_cents | wrong_distinct_fee_cents | mean_fee_cad |
| --- | --- | --- | --- |
| 3 | 1000 | 750 | 3.33 |

## Fixture: empty

### u01_inventory

| booking_rows | booking_refs | booked_seats |
| --- | --- | --- |
| 0 | 0 | NULL |

### u02_open_sessions

| session_id | topic | site | starts_on | capacity |
| --- | --- | --- | --- | --- |

**No rows returned.**

### u02_large_bookings

| reg_id | session_id | seats |
| --- | --- | --- |

**No rows returned.**

### u02_date_window

| session_id | starts_on |
| --- | --- |

**No rows returned.**

### u02_fee_display

| reg_id | fee_cents | fee_cad |
| --- | --- | --- |

**No rows returned.**

### u03_missing_attendance

| reg_id | session_id | seats |
| --- | --- | --- |

**No rows returned.**

### u03_quality_counts

| booking_rows | recorded_attendance_rows | unknown_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- |
| 0 | 0 | 0 | NULL |

### u03_duplicate_intake

| reg_id | intake_rows |
| --- | --- |

**No rows returned.**

### u03_invalid_intake

| ingest_id | reg_id | seats | attended |
| --- | --- | --- | --- |

**No rows returned.**

### u04_session_totals

| session_id | booking_rows | booked_seats | recorded_attendance_rows | recorded_attended_seats |
| --- | --- | --- | --- | --- |

**No rows returned.**

### u04_known_rates

| session_id | attended_seats | known_booked_seats | known_attendance_pct |
| --- | --- | --- | --- |

**No rows returned.**

### u04_having

| session_id | booked_seats |
| --- | --- |

**No rows returned.**

### u04_empty_summary

| booking_rows | booked_seats | mean_booking_size |
| --- | --- | --- |
| 0 | NULL | NULL |

### u06_attendance_bands

| reg_id | attendance_band |
| --- | --- |

**No rows returned.**

### u06_session_report

| session_id | status | capacity | booking_rows | booked_seats | unknown_seats | known_seats | recorded_attended_seats |
| --- | --- | --- | --- | --- | --- | --- | --- |

**No rows returned.**

### u06_above_mean

| reg_id | seats |
| --- | --- |

**No rows returned.**

### u06_orphans

| ingest_id | reg_id | session_id |
| --- | --- | --- |

**No rows returned.**

### u07_bounds

| booking_rows | booked_seats | recorded_attended_seats | unknown_seats | known_seats | known_attendance_pct | lower_pct | upper_pct |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL |

### u07_capacity

| open_capacity | booked_open_seats | booking_capacity_pct |
| --- | --- | --- |
| 0 | 0 | NULL |

### u08_controls

| sessions | booking_rows | booked_seats | fee_cents | raw_intake_rows |
| --- | --- | --- | --- | --- |
| 0 | 0 | 0 | 0 | 0 |

### u08_project_session_report

| session_id | status | capacity | booking_rows | booked_seats | known_seats | unknown_seats | recorded_attended_seats | booking_capacity_pct | lower_attendance_pct | upper_attendance_pct |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

**No rows returned.**

### u08_fee_sanity

| booking_rows | fee_cents | wrong_distinct_fee_cents | mean_fee_cad |
| --- | --- | --- | --- |
| 0 | NULL | NULL | NULL |

