Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
common table expression
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
-- CTE (common table expressions) --a way to get from representation A to representation B in multiple small steps --just a meaningless example with one_two as ( select 1 as number union select 2 as number ) , three_four as ( select 3 as number union select 4 as number ) , pilots_with_number as ( select * from pilots left outer join one_two on 1=1 ) , planes_with_numbers as ( select * from planes left outer join three_four on 1=1 ) select * from pilots_with_number left outer join planes_with_numbers on 1=1
View schema
Execution time: 0.26 sec, rows selected: 32, rows affected: 0, absolute service time: 1.58 sec
fork mode
|
history
|
discussion
ID
First_name
Last_name
Title
Birth_date
Pilots_ID
number
ID
Model
Built_date
Number_of_seats
number
1
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
2
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
3
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
4
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
5
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
6
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
7
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
8
1
John
Smith
First pilot
5/5/1965 12:00:00 AM
NULL
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
9
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
10
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
11
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
12
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
13
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
14
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
15
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
16
2
John
Doe
Second pilot
1/2/1970 12:00:00 AM
1
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
17
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
18
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
19
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
20
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
21
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
22
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
23
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
24
3
William
Lee
Third pilot
3/27/1975 12:00:00 AM
2
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
25
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
26
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
1
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
27
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
28
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
1
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4
29
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
3
30
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
2
1
Boeing 777
5/5/1995 12:00:00 AM
300
4
31
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
3
32
4
Steve
Quick
Fourth pilot
12/23/1980 12:00:00 AM
3
2
2
Boeing 787 Dreamliner
7/5/2008 12:00:00 AM
310
4