Back to projects
SQLReporting

EduTrack Campus Database — SQL Analysis in MySQL

Seven business questions answered in SQL — from filtering and joins to subqueries and CTEs.

EER diagram of the Edu-Track campus database showing department, students, courses, instructors and enrollments tables linked by keys

Tools used

MySQL and MySQL Workbench for database design and querying; PowerPoint for the end-of-module presentation.

Technologies

MySQL · MySQL Workbench · SQL Joins · GROUP BY / HAVING · Subqueries · CTEs · PowerPoint

1. Business Problem

A campus runs on records spread across separate tables — students, courses, instructors, departments and enrolments — and the practical questions cut across all of them. I used SQL to answer seven questions about enrolment, course credits, departmental GPA, instructor workload and course difficulty, straight from the database rather than from a spreadsheet export.

2. Dataset Overview

  • Five related tables: department (the central reference entity), students, courses, instructors and enrollments.
  • students carries department_id; courses carries department_id and instructor_id; enrollments is the junction table pairing students with courses per semester, holding semester and grade_point.
  • Surrogate integer primary keys throughout, with every foreign key mandatory, so referential integrity is enforced end to end.

3. Data Cleaning Process

  • Added primary keys to all five tables with ALTER TABLE so every row is uniquely identifiable.
  • Added foreign-key constraints linking students, courses and instructors back to department, courses to instructors, and enrollments to both students and courses.
  • Documented the design in an EER diagram: three one-to-many relationships into department, one instructor-to-many-courses, and the many-to-many students-courses resolved by enrollments.
  • Non-identifying relationships throughout — foreign keys live as ordinary attributes in the child tables, keeping the keys stable.

4. Exploratory Data Analysis

  • Q1 — 2022 enrolment: SELECT with CONCAT to combine names, WHERE on enrollment_year, ORDER BY last_name.
  • Q2 — course credits: filtered courses above 3 credits and sorted descending to surface the heaviest courses first.
  • Q3 — department GPA: GROUP BY department_id with AVG(gpa) rounded to two decimals for like-for-like comparison.
  • Q4 — instructor workload: COUNT(*) per department with HAVING COUNT(*) > 4 to filter groups, not rows.
  • Q5 — Fall 2024 enrolment: three-table JOIN through enrollments to pair each student with their course and semester.
  • Q7 — above-average GPA: subquery computing the overall average inside the WHERE clause, so the benchmark moves with the data.
  • Q9 — course difficulty: CTE averaging grade_point per course, joined back to courses and filtered to averages above 3.0.

5. Dashboard

  • MySQL Workbench served as the workspace: each question was run, its result grid captured, and its query documented.
  • Every question was presented as business question → SQL syntax → result table → key takeaway in the end-of-module deck.
  • The EER diagram doubles as the documentation — relationships and cardinality are readable by anyone joining the project.

6. Key Findings

  • 2022 enrolment: 10 students, returned sorted and readable in one query.
  • Departments 1, 2, 8 and 9 employ more than four instructors (10, 7, 7 and 6 respectively).
  • Five students sit above the overall average GPA, topping out at 3.74 in department 2.
  • Courses averaging above a 3.0 grade point: Entrepreneurship 4.00, Introduction to Programming 3.95, Local Government Administration 3.86, Calculus I 3.66, Principles of Management 3.62.

7. Recommendations

  • Treat the junction-table design as the template for any future student-course reporting needs.
  • Re-run the CTE difficulty ranking each semester and flag courses drifting below the 3.0 bar.
  • Replace manual headcount checks with grouped HAVING queries that fail loudly when thresholds are crossed.
  • Save the seven queries as reusable reports rather than one-off answers.

8. Business Impact

  • Proved end-to-end SQL capability: schema design, integrity constraints, EER documentation and seven working analytical queries.
  • Demonstrated that the same analytical thinking used in Excel (filter, group, compare, rank) transfers directly to SQL.
  • Delivered a presented end-of-module project for the ITF-NECA / Shamzbridge programme, September 2026.

9. Lessons Learned

  • Designing the keys first is what makes every later query trustworthy — the relationships carry the answers.
  • A CTE is the readable way to break a two-step question (average per course, then filter) into named steps.
  • Interpreting results mattered as much as retrieving them: each query ended with a takeaway, not just a table.

Want the full walkthrough?

Happy to walk through the queries, the formulas and the decisions behind this analysis.

Get in touch