Skip to content

Interactive SQL learning playground with guided lessons, sandboxed query execution, and instant feedback.

License

Notifications You must be signed in to change notification settings

RaghavOG/sql-labs

SQL Labs

A modern, LeetCode-style SQL learning playground with 30+ interactive lessons

License: MIT Next.js TypeScript

Learn SQL through hands-on practice with real-time query execution and instant feedback.

✨ Features

  • 🎓 30+ Structured Lessons - From beginner to advanced
  • 💻 Monaco Editor - Professional code editor with SQL syntax highlighting
  • 🎯 Task-Focused UI - LeetCode-style problem-solving layout
  • Instant Feedback - Run queries and see results immediately
  • 📊 Real Database - SQLite in-memory for authentic SQL experience
  • 🌙 Dark Theme - Optimized for long coding sessions
  • Progress Tracking - Your completed lessons are saved

🚀 Quick Start

# Clone the repository
git clone https://github.com/RaghavOG/sql-labs.git
cd sql-labs

# Install dependencies
npm install

# Run development server
npm run dev

Open http://localhost:3000 and start learning!

📚 Lesson Categories

  1. Querying Data - SELECT, DISTINCT, LIMIT
  2. Filtering Data - WHERE, AND/OR, BETWEEN, IN, LIKE
  3. Sorting Data - ORDER BY, ASC/DESC
  4. Aggregation - COUNT, AVG, GROUP BY, HAVING
  5. Joins - INNER JOIN, LEFT JOIN, multi-table joins
  6. Subqueries - Nested queries, IN, EXISTS
  7. Advanced - UNION, complex queries

🎯 How It Works

Each lesson provides:

  • Clear task description
  • Sample database schema
  • SQL editor with syntax highlighting
  • Hint system (optional)
  • Instant query results

Write your SQL, press Ctrl+Enter (or click Run), and see the results!

🛠️ Tech Stack

🌐 Deploy Your Own

Deploy with Vercel

Or manually:

npm run build
npm run start

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Ways to contribute:

  • Add new lessons
  • Improve UI/UX
  • Fix bugs
  • Improve documentation

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Made with ❤️ by Raghav

🙏 Acknowledgments

  • Inspired by LeetCode's problem-solving interface
  • Built with modern web technologies
  • Community feedback and contributions

Start learning SQL today! 🚀

About

Interactive SQL learning playground with guided lessons, sandboxed query execution, and instant feedback.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks