🚀 Want to practice with a REAL MySQL database?

Login to save your queries, track progress, and use real database features!

Login Sign Up Free
🚀 Want to practice with a real MySQL database? Login to access advanced features: real database, query history, saved queries & more!
0
Queries Executed
0
Successful Queries
0%
Success Rate

Query Editor

📝 Sample Queries (Click to Try)

SELECT * FROM students;
View all students
SELECT * FROM courses WHERE credits >= 3;
Find courses with 3+ credits
SELECT students.name, courses.course_name FROM enrollments...
Join students with their enrolled courses
SELECT department, COUNT(*) FROM courses GROUP BY department;
Count courses by department
SELECT AVG(credits) as avg_credits FROM courses;
Calculate average course credits

Database Schema

Practice database with student enrollment data

📘 students

  • student_id (INTEGER PRIMARY KEY)
  • name (TEXT)
  • email (TEXT)
  • major (TEXT)
  • enrollment_year (INTEGER)

📗 courses

  • course_id (INTEGER PRIMARY KEY)
  • course_code (TEXT)
  • course_name (TEXT)
  • department (TEXT)
  • credits (INTEGER)

📕 enrollments

  • enrollment_id (INTEGER PRIMARY KEY)
  • student_id (INTEGER FOREIGN KEY)
  • course_id (INTEGER FOREIGN KEY)
  • semester (TEXT)
  • grade (TEXT)

💡 Tips

  • Use SELECT to retrieve data
  • Use WHERE to filter results
  • Use JOIN to combine tables
  • Use GROUP BY for aggregations
  • Use ORDER BY to sort results

⚠️ Note

This is a read-only practice environment. Only SELECT queries are allowed.