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
CREATE TABLE employees ( id INT, name VARCHAR(100), department VARCHAR(100), salary INT, employ_id INT ); INSERT INTO employees(id, name, department, salary, employ_id) VALUES (1001, 'Ivanov', 'SAPIENS', 100000, 1001), (1002, 'Petrov', 'SAPIENS', 100000, 1001), (1003, 'Sidorov', 'TECHNOLOGIES', 130000, 1001), (1004, 'Korotkov', 'TECHNOLOGIES', 120000, 1001), (1005, 'File', 'SAPIENS', 90000, 1001), (1006, 'Smirnov', 'REVOLT', 125000, 1001), (1007, 'Godov', 'REVOLT', 125000, 1001); CREATE TABLE Business_trip ( id INT, employ_id INT, dep_date DATE, arriv_date DATE, trav_expens INT ); INSERT INTO Business_trip(id, employ_id, dep_date, arriv_date, trav_expens) VALUES (2001, 1001, '2014-01-01', '2014-01-10', 2000), (2002, 1001, '2015-01-01', '2015-01-10', 3000), (2003, 1001, '2015-02-01', '2015-03-10', 1500), (2004, 1001, '2015-06-01', '2015-07-10', 2900), (2005, 1001, '2015-07-01', '2016-08-10', 3700), (2006, 1001, '2016-01-01', '2016-01-10', 5000), (2007, 1001, '2016-04-01', '2016-06-10', 1000), (2008, 1001, '2016-07-01', '2016-08-10', 5700), (2009, 1001, '2017-01-01', '2017-01-10', 2100), (2010, 1001, '2017-03-01', '2017-04-10', 5000); -- Corrected query: SELECT SUM(b.trav_expens) AS SUM_TRAV_EXPENS FROM employees AS e LEFT JOIN Business_trip AS b ON e.employ_id = b.employ_id WHERE e.salary > 90000 AND b.dep_date >= '2015-06-01';
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