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
select s.air_1 as departure_airport, s.air_2 as arrival_airport from (select LEAST(airport_1,airport_2) as air_1, GREATEST(airport_2,airport_1) as air_2 from (select airport_name->>'en' as airport_1 from airports_data) a cross join (select airport_name->>'en' as airport_2 from airports_data) ad where airport_1<>airport_2 or airport_2<>'Anapa Vityazevo Airport' group by LEAST(airport_1,airport_2), GREATEST(airport_2,airport_1)) s where NOT Exists (select a.airport_name->>'en' as departure_airport, ad.airport_name->>'en' as arrival_airport from (select distinct f.departure_airport, f.arrival_airport from flights f) as f join airports_data a on a.airport_code = f.departure_airport join airports_data ad on ad.airport_code = f.arrival_airport where a.airport_name->>'en' = s.air_1 and ad.airport_name->>'en' = s.air_2) group by s.air_1,s.air_2 order by 1,2
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