Hult MSc Business Analytics · Team coursework · SQL · 2025
Semester at Sea revenue in SQL
A relational model and MySQL analysis for a study-abroad voyage programme whose books run on a fiscal year (July to June) while its service runs on an academic year (August to August). The mismatch hid how much each voyage really earned, and where money leaked through cancellations.
The problem
Summer voyages straddle the 30 June fiscal cut-off, so part of their revenue lands in the next fiscal year. Finance saw one number; operations lived another. The team modelled bookings, payments and voyages so revenue could be measured on either calendar.
Data model
A 13-table model designed in MySQL Workbench; the 11 tables the queries use carry every primary and foreign key. Names are pseudonymised before loading: each person becomes a stable code, an HMAC-SHA256 of their ID, so joins still work and nobody can reverse a code without the key.
The queries use generated daily calendars to count cabin-nights, CTE pipelines, date-range overlap joins, WITH ROLLUP totals, tiered CASE logic for the refund policy and defensive date parsing.
Results
- The fiscal year understates voyage revenue by $1.42M. Measuring on the academic calendar lines revenue up with the service delivered.
- Summer is the growth lever. About 80% of the revenue lost to empty cabins falls between May and August. At 100% occupancy the year would have earned $21.61M.
- Cancellations are revenue too. Of 140 cancellations, 36 came within 14 days and forfeited full payment ($277,569); 24 partial refunds kept $500 each ($12,000).
Verification
Every reported query was re-run end to end on MySQL 8 in September 2026. Three queries on unpaid balances and payment timing did not reproduce the team's original figures, so none of their results are reported. Loading also surfaced 55 duplicated booking IDs and payment rows for people missing from the people table; the repo documents how each is handled.
The dataset is the programme's real export and is not published; the repo includes everything needed to rebuild it from the source files.