[ Web Proxy ]
URL:
Viewing: https://sql-js.github.io/sql.js/examples/GUI/index.html [Back]  [Original]

SQL.js - Modern SQL Interpreter

SQL.js Interpreter

Execute Save DB Load DB Examples
SQL Editor
-- Basic SQL Demo -- Create a simple employees table DROP TABLE IF EXISTS employees; CREATE TABLE employees ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, department TEXT, salary NUMERIC, hire_date DATE ); -- Insert sample data INSERT INTO employees (name, department, salary, hire_date) VALUES ('Alice Smith', 'Engineering', 85000, '2020-01-15'), ('Bob Johnson', 'Marketing', 72000, '2019-03-20'), ('Carol Williams', 'Engineering', 92000, '2018-11-07'), ('Dave Brown', 'Finance', 115000, '2017-05-12'), ('Eve Davis', 'Engineering', 110000, '2021-08-30'); -- Query the data SELECT department, COUNT(*) as employee_count, ROUND(AVG(salary), 2) as avg_salary FROM employees GROUP BY department ORDER BY avg_salary DESC;
Ready
Result 1 +
Results will be displayed here
No query executed yet

Original work by kripken (sql.js) | Project maintained by lovasoa

Result
Execute a query to see results
Executing query...
Query failed

Web Proxy Viewer  |  New URL  |  Original Page