LEARN WITH ABDOU / LAB 11 REPORTING REHEARSAL
Original fictional Harbor Snow fixture. Not the assigned Spirit Mountain database.
Use SQLite 3.25 or newer. No accounts, uploads or client files are needed.

1. Extract this folder. Open harbor_snow.db in your desktop SQLite tool.
   Make a working COPY first, named rehearsal-copy.db; keep the original.
2. Run SELECT sqlite_version(); and PRAGMA foreign_keys=ON; in the connection.
3. Views are already installed. Read setup.sql and views.sql to see their definitions.
4. Read and run one topic at a time from the web workshop / examples.sql.
   Topic 1 rolls back its demonstration. Topic 8 commits a booking and debit.
   Start each investigation on a fresh copy, so earlier writes do not change its evidence.
5. For the failed transfer, run each statement SEPARATELY in the SAME connection.
   After the CHECK error, SELECT balances BEFORE ROLLBACK; then ROLLBACK and SELECT again.
   A script runner may stop on error or close its connection. Use interactive sqlite3
   if your GUI does not let you observe the open transaction. Never leave it pending.
6. Keep SQL, result output and reasoning as text. Download notes from the workshop.
   Nothing here submits to Canvas. Use the actual Lab 11 handout for your report.

REBUILD FROM SOURCE (optional, SQLite CLI)
Open a terminal in this extracted directory. Choose an unused filename:
  sqlite3 fresh-rehearsal.db
At the sqlite> prompt:
  .bail on
  .read setup.sql
  .read views.sql
  SELECT sqlite_version();
  PRAGMA foreign_key_check;
  SELECT * FROM monthly_sales ORDER BY month;
  .quit
These scripts create objects in an EMPTY database; do not rerun them in a used file.
No DROP or file deletion is needed. Enable foreign keys again in every new connection.

SCHEMA AND MEANING
guests 6; sales 8; coaches 3; lessons 4. Three reporting views.
All values/names are invented; amounts use whole dollars for small arithmetic.
Admission sales exclude lessons. Anonymous admissions earn revenue without a guest.
No February admissions are recorded. A missing month is not universally proof of zero.
The original two March purchases are separate sales even though values match.

WORKSHOP: https://learnwithabdou.com/courses/mis3220/labs/reporting-layer
CLASS LAB: https://learnwithabdou.com/courses/mis3220/labs/lab-11
