Applied edition · 44 planned hours · Unpiloted · Human review pending. Self-review is not a credential; the full 108-hour semester remains unfinished. No browser SQL execution.
Independent project: model evidence and explained decisions
This is one acceptable solution architecture, not an external grading decision. Compare after retaining your attempt. Equivalent SQL and appropriately cautious decisions are welcome.
Source and controls
The independent fixture has 4 sessions, 5 booking records, 4 booking references, 7 booked seats, 1,500 fee cents and 6 raw intake claims. Three open sessions have total capacity 9; cancelled 204 has capacity 0. Four booking rows have attendance recorded, covering six seats; recorded attended seats total four. Booking 2002 represents the one unknown seat.
u08_controls returns (4,5,7,1500,6) in columns sessions, booking_rows, booked_seats, fee_cents, raw_intake_rows. u01_inventory returns (5,4,7). Distinct references are not unique participants. The source contains no person-level evidence to answer unique reach.
All-session answer
| Session | Status | Capacity | Bookings | Booked seats | Known seats | Unknown seats | Recorded attended | Booking/capacity | Lower attendance | Upper attendance |
|---|---|---|---|---|---|---|---|---|---|---|
| 201 | open | 3 | 2 | 2 | 1 | 1 | 1 | 66.67% | 50% | 100% |
| 202 | open | 2 | 1 | 2 | 2 | 0 | 0 | 100% | 0% | 0% |
| 203 | open | 4 | 2 | 3 | 3 | 0 | 3 | 75% | 100% | 100% |
| 204 | cancelled | 0 | 0 | 0 | 0 | 0 | 0 | NULL | NULL | NULL |
Counts reconcile to five bookings, seven seats, six known seats, one unknown seat and four recorded attendees counted as seats. For 204, displayed zero additive counts do not create an attendance population. Session 202 really records zero attended seats for a two-seat booking; that is different from 204's absence of bookings and 201's partially unknown attendance.
Wrong join and repair
A raw LEFT JOIN produces six rows: 201 twice, 202 once, 203 twice, 204 once. Summing capacity gives 3+3+2+4+4+0=16, not nine. The extra seven is one repeated 3 and one repeated 4. INNER JOIN removes cancelled 204's zero row, leaving five rows and the same wrong sum 16; a matching wrong sum across join types is not validation.
Here SUM(DISTINCT capacity) happens to be 9, because distinct session capacities are 3,2,4,0. Base defeats the shortcut: two separate sessions have capacity four, so DISTINCT merges legitimate entities. Repair by summing open capacity directly from sessions or by joining a one-row-per-session summary and verifying its unique key. Do not use accidental agreement as proof.
Fee control is 1,500 cents=CAD 15.00, mean per booking CAD 3.00. DISTINCT fee sum is 750 cents, dropping one valid 250-cent and one valid 500-cent contribution. No conclusion about payment or profit follows from this control.
Missingness and comparison
Known-only attendance is 4/6=66.67%. All-booked attendance is bounded by 4/7=57.14% and 5/7=71.43%, conditional on the supplied booked and known-attendance counts being correct. Booking-to-open-capacity is 7/9=77.78%. These are different measures. Bounds are not a statistical confidence interval; the scenario provides neither random sampling nor a predictive model.
Quality log should flag raw duplicate claims 11/12, orphan 13, missing ID 14, zero seats 15 and attendance above seats 16. These raw records remain outside the trusted totals. A future record could fail several rules; error-class totals do not necessarily count distinct bad rows.
Model coordinator note
The next step is to check session 201's missing attendance entry and confirm the completeness of the supplied snapshot before using attendance to plan the next round. Across the three listed open sessions, seven seats are booked against nine places, a booking-to-capacity ratio of 77.78%. Session 202 is fully booked by this measure, while 201 and 203 have booked ratios of 66.67% and 75% respectively; booking is not the same as attendance.
Attendance is recorded for six of the seven booked seats. Four of those six attended, giving a known-only rate of 66.67%. One booked seat in session 201 has no attendance count. Under the supplied count rules, all-booked attendance is therefore between four and five seats, or 57.14%–71.43%. Session 202 records zero attendance for its two booked seats, but the records do not explain why. These small synthetic records cannot establish unique people reached, satisfaction, causal effects, profitability or next month's demand.
Keep the six problematic intake claims separate from the admitted bookings and ask the fictional source-custodian role to resolve their identity, parent and count issues. Preserve the original source and record every justified correction. Rerun the saved queries and reconcile controls after any admitted correction; stop this reconciliation when those corrections and remaining unresolved fields are explicitly documented. A broader programme decision would still require additional evidence beyond this SQL exercise.
Reproduction example
From the package root, with the pinned runtime:
python3 run.py independent --query u08_controls
python3 run.py independent --query u08_project_session_report
python3 run.py independent --query u07_bounds
python3 run.py independent --query u07_capacity
python3 run.py independent --query u03_duplicate_intake
python3 run.py independent --query u03_invalid_intake
python3 run.py independent --query u06_orphans
python3 run.py changed --query u08_project_session_report
python3 run.py empty --query u07_bounds
python3 -m unittest -vActual outputs, not these commands alone, establish execution. Add your own query filenames with --file. Use a different folder for your results to avoid altering the authored evidence. A simulated role/access plan is acceptable if it minimizes shared fields and assigns responsibility without claiming an implemented permission system or an invented legal retention period.