| Feature | Description |
|---|---|
| Pink Aesthetic Theme | Elegant, feminine, professional dark UI with a vibrant #ff2e93 pink palette |
| Dark / Light Toggle | Smooth theme switching with full CSS variable system |
| Resizable Sidebar | Drag the sidebar edge to resize like VS Code |
| SQL Reference Panel | 9 collapsible cheat cards with clickable snippets that load directly into the editor |
| Live SQL Execution | Write and run SELECT queries instantly โ no server needed |
| Read-Only Security | Only SELECT statements are permitted โ safe for learning environments |
| 50-Row Academic Dataset | Rich student database across 8 departments with 10 columns |
| Smart Cell Coloring | Status, grade, and fee columns are color-coded automatically |
| Keyboard Shortcut | Ctrl + Enter (or Cmd + Enter) to run queries |
| Line Numbers | Editor shows live line numbers as you type |
| Tab Key Support | Press Tab in the editor to insert 2-space indentation |
Download Komal_SQL_Server.html, then double-click to open in any modern browser.
That's it. No npm install. No server. No build step.
git clone https://github.com/komalharshita/sql-playground.git
cd sql-playground
open Komal_SQL_Server.html # macOS
# or
start Komal_SQL_Server.html # Windows
# or
xdg-open Komal_SQL_Server.html # Linux
main branch, / (root)https://<your-username>.github.io/sql-playgroundThe playground ships with a single table: students
-- Table schema
CREATE TABLE students (
student_id INT, -- Unique ID (1001โ1050)
name STRING, -- Full student name
department STRING, -- Academic department
year INT, -- Year of study (1โ4)
gpa FLOAT, -- GPA (2.1 โ 4.0)
attendance INT, -- Attendance percentage (48โ99)
status STRING, -- 'Active' | 'On Probation'
grade STRING, -- 'A+' | 'A' | 'B+' | 'B' | 'C' | 'D' | 'F'
credits INT, -- Credits earned (12โ128)
fee_status STRING -- 'Paid' | 'Pending' | 'Waived'
);
Departments included:
Computer Science ยท Data Science ยท Mathematics ยท Physics ยท Chemistry ยท Electronics ยท Mechanical Engg
50 records with realistic, varied data โ a mix of honor roll students, students on probation, scholarship recipients (fee_status = 'Waived'), and everything in between.
-- Top 5 students by GPA
SELECT name, department, gpa
FROM students
ORDER BY gpa DESC
LIMIT 5;
-- At-risk students (low GPA AND low attendance)
SELECT name, gpa, attendance, status
FROM students
WHERE gpa < 3.0 AND attendance < 65;
-- Department summary report
SELECT department,
COUNT(*) AS student_count,
ROUND(AVG(gpa), 2) AS avg_gpa,
MIN(attendance) AS lowest_att
FROM students
GROUP BY department
ORDER BY avg_gpa DESC;
-- Pending fee breakdown
SELECT name, department, year, fee_status
FROM students
WHERE fee_status = 'Pending'
ORDER BY year ASC;
-- 4th year honor students
SELECT name, grade, gpa, credits
FROM students
WHERE year = 4 AND gpa >= 3.7
ORDER BY gpa DESC;
| Technology | Role |
|---|---|
| React 18 (CDN) | UI component rendering |
| AlaSQL 1.7.3 | In-browser SQL engine |
| Babel Standalone | JSX transpilation in the browser |
| Font Awesome 6.5 | Icons |
| Syne (Google Fonts) | Display / UI font |
| Fira Code (Google Fonts) | Monospace / code font |
| Vanilla CSS | All styling via CSS custom properties |
sql-playground/
โ
โโโ ๐ Komal_SQL_Server.html โ The entire application (open this!)
โโโ ๐ README.md โ You are here
โโโ ๐ LICENSE โ MIT License
โโโ ๐ CHANGELOG.md โ Version history
โโโ ๐ CONTRIBUTING.md โ How to contribute
โโโ ๐ CODE_OF_CONDUCT.md โ Community guidelines
โ
โโโ ๐ docs/
โ โโโ ๐ USAGE.md โ Detailed usage guide
โ โโโ ๐ SQL_REFERENCE.md โ Full SQL syntax reference
โ
โโโ ๐ .github/
โโโ ๐ PULL_REQUEST_TEMPLATE.md
The app uses a CSS custom property system with two fully-defined themes:
/* Dark Theme (default) */
--bg: #0a0a0f; /* Deep black background */
--surface: #14141c; /* Panel surfaces */
--pink: #ff2e93; /* Primary pink accent */
--pink-acc: #ff7ab8; /* Soft rose accent */
--pink-lt: #ffc1e3; /* Light pink highlight */
/* Light Theme */
--bg: #fff5fa; /* Warm white background */
--pink: #d4006b; /* Deeper pink for contrast*/
Toggle is in the top-right navbar (โ / ๐ button).
Contributions are welcome! Please read CONTRIBUTING.md before opening a pull request.
Quick ideas to contribute:
courses) for JOIN examplesThis project is licensed under the MIT License โ see LICENSE for details.