SQL Practice Logo

SQLPractice Online

Home/Tutorials/

School Database

Practice with School Database
Beginner Level6 Tables

School Database SQL Tutorial

Educational institution management with students, courses, and grades

🎯 What you'll practice: Student records, Grade reporting, Course management, Academic analytics using real-world database scenarios.

📊 Database Tables

students

Core school data table

courses

Core school data table

enrollments

Core school data table

grades

Core school data table

teachers

Core school data table

departments

Core school data table

🔍 Common Query Patterns

Student GPA Calculation

Calculate GPA for each student

SELECT s.student_name,
AVG(g.grade_point) as gpa
FROM students s
JOIN grades g ON s.student_id = g.student_id
GROUP BY s.student_id, s.student_name
ORDER BY gpa DESC;
Try Now →

Course Enrollment Stats

Find most popular courses

SELECT c.course_name,
COUNT(e.student_id) as enrollment_count
FROM courses c
LEFT JOIN enrollments e ON c.course_id = e.course_id
GROUP BY c.course_name
ORDER BY enrollment_count DESC;
Try Now →

🚀 Ready to Practice?

Start practicing SQL queries with the school database database. All tables are loaded and ready to use!