SQLize
Online
/
PHPize Online
/
SQLtest Online
A
A
A
Share
Donate
Blog
Popular
Donate
A
A
A
Share
Blog
Popular
SQLize.online is a free online SQL environment for quickly running, experimenting with and sharing code.
You can run your SQL code on top of the most popular RDBMS including MySQL, MariaDB, SQLite, PostgreSQL, Oracle and Microsoft SQL Server.
SQL code:
Upload
Copy
Format
Clear
-- comment CREATE schema seminar_3; CREATE table seminar_3.salary ( employee_nm text, department_nm text, salary_amt numeric(20, 2) ); INSERT INTO seminar_3.salary VALUES('Ken Sánchez', 'HR', 78); INSERT INTO seminar_3.salary VALUES('TerriLee Duffy', 'HR', 95); INSERT INTO seminar_3.salary VALUES('Roberto Tamburello', 'HR', 382); INSERT INTO seminar_3.salary VALUES('Rob Walters', 'HR', 16); INSERT INTO seminar_3.salary VALUES('Gail Erickson', 'HR', 1079); INSERT INTO seminar_3.salary VALUES('Jossef Gibson', 'HR', 102); INSERT INTO seminar_3.salary VALUES('Dylan Miller', 'HR', 486); INSERT INTO seminar_3.salary VALUES('Diane Margheim', 'HR', 1953); INSERT INTO seminar_3.salary VALUES('Gigi Matthew', 'SALE', 49); INSERT INTO seminar_3.salary VALUES('Michael Raheem', 'SALE', 71); INSERT INTO seminar_3.salary VALUES('Ovidiu Cracium', 'SALE', 94); INSERT INTO seminar_3.salary VALUES('Thierry Hers', 'SALE', 61); INSERT INTO seminar_3.salary VALUES('Janice Galvin', 'SALE', 972); INSERT INTO seminar_3.salary VALUES('Michael Sullivan', 'SALE', 849); INSERT INTO seminar_3.salary VALUES('Sharon Salavaria', 'SALE', 715); INSERT INTO seminar_3.salary VALUES('David Michael', 'SALE', 94); INSERT INTO seminar_3.salary VALUES('Kevin Brown', 'R&D', 891); INSERT INTO seminar_3.salary VALUES('John Wood', 'R&D', 1486); INSERT INTO seminar_3.salary VALUES('Mary Dempsey', 'R&D', 176); INSERT INTO seminar_3.salary VALUES('Wanida Benshoof', 'R&D', 49); INSERT INTO seminar_3.salary VALUES('Terry Eminhizer', 'R&D', 381); INSERT INTO seminar_3.salary VALUES('Sariya Harnpadoungsataya', 'R&D', 946); INSERT INTO seminar_3.salary VALUES('Mary Gibson', 'R&D', 486); INSERT INTO seminar_3.salary VALUES('Jill Williams', 'R&D', 19); INSERT INTO seminar_3.salary VALUES('James Hamilton', 'R&D', 46); INSERT INTO seminar_3.salary VALUES('Peter Krebs', 'R&D', 445); INSERT INTO seminar_3.salary VALUES('Jo Brown', 'R&D', 666) ; INSERT INTO seminar_3.salary VALUES('Guy Gilbert', 'MANAGEMENT', 482); INSERT INTO seminar_3.salary VALUES('Mark McArthur', 'MANAGEMENT', 12); INSERT INTO seminar_3.salary VALUES('Britta Simon', 'MANAGEMENT', 194); INSERT INTO seminar_3.salary VALUES('Margie Shoop', 'MANAGEMENT', 481); INSERT INTO seminar_3.salary VALUES('Rebecca Laszlo', 'MANAGEMENT', 16); INSERT INTO seminar_3.salary VALUES('Annik Stahl', 'MANAGEMENT', 134); INSERT INTO seminar_3.salary VALUES('Suchitra Mohan', 'R&D', 87); INSERT INTO seminar_3.salary VALUES('Brandon Heidepriem', 'R&D', 111) ; INSERT INTO seminar_3.salary VALUES('Jose Lugo', 'R&D', 185); INSERT INTO seminar_3.salary VALUES('Chris Okelberry', 'R&D', 94); INSERT INTO seminar_3.salary VALUES('Kim Abercrombie', 'R&D', 348); INSERT INTO seminar_3.salary VALUES('Ed Dudenhoefer', 'R&D', 68); INSERT INTO seminar_3.salary VALUES('JoLynn Dobney', 'R&D', 346); INSERT INTO seminar_3.salary VALUES('Bryan Baker', 'R&D', 185); INSERT INTO seminar_3.salary VALUES('James Kramer', 'SUPPORT', 965); INSERT INTO seminar_3.salary VALUES('Nancy Anderson', 'SUPPORT', 444); INSERT INTO seminar_3.salary VALUES('Simon Rapier', 'SUPPORT', 133); INSERT INTO seminar_3.salary VALUES('Thomas Michaels', 'SUPPORT', 200); INSERT INTO seminar_3.salary VALUES('Eugene Kogan', 'SUPPORT', 144); INSERT INTO seminar_3.salary VALUES('Andrew Hill', 'SUPPORT', 186); INSERT INTO seminar_3.salary VALUES('Ruth Ellerbrock', 'SUPPORT', 179); INSERT INTO seminar_3.salary VALUES('Barry Johnson', 'HEAD', 10000); INSERT INTO seminar_3.salary VALUES('Sidney Higa', 'HEAD', 1); INSERT INTO seminar_3.salary VALUES('Max Lanson', 'PR', 150); SET search_path = 'seminar_3'; ALTER table salary ADD column comment text; UPDATE salary SET comment = 'коммент ' || salary_amt; -- MAIN /*SELECT DISTINCT department_nm FROM salary WHERE department_nm like '__';*/ SELECT department_nm, max(salary_amt) - avg(salary_amt) FROM salary GROUP BY department_nm;
SQL
Server:
MySQL 5.7
MySQL 5.7 Sakila (ReadOnly)
MySQL 8.0
MySQL 8.0 Sakila (ReadOnly)
MariaDB 11.5
SQLite 3
SQLite 3 Preloaded
PostgreSQL 10 Bookings (ReadOnly)
PostgreSQL 11
PostgreSQL 12
PostgreSQL 13
PostgreSQL 14
PostgreSQL 15
MS SQL Server 2017
MS SQL Server 2019
MS SQL Server 2022
MS SQL Server 2022 AdventureWorks (ReadOnly)
Firebird 4.0
Firebird 4.0 (Employee)
Oracle Database 19c (HR)
Oracle Database 21c
Oracle Database 23c Free
SOQOL
Version
ER Diagram
Preserve result
Stuck with a problem?
Got Error?
Ask ChatGPT!
Result:
Copy
Clear