次の 3 つのテーブルがあるとします。
輸送する :
ID
--------------------
1
2
3
到着:
shipID Atime
--------------------
1 t1
1 t3
離れる:
shipID Ltime
--------------------
1 t2
1 t4
返すクエリが必要です:
shipID Atime Ltime
------------------------------
1 t1 null
1 null t2
1 t3 null
1 null t4
ここで、t1>t2>t3>t4
この結果は に受け入れられます :
shipID Atime Ltime
------------------------------
1 t1 null
1 t3 null
1 null t2
1 null t4