多くのテーブルからデータを取得する複雑なクエリがあるとします。
    SELECT
    DISTINCT
        table1.hash, 
        table2.field1,
        table3.field1,
        table4.field1, 
...
...
...
    FROM table1
    inner JOIN table2
    ON table1.hash=device_model.hash 
        and table1.date = table2.date 
        and table1.time = table2.time
...
...
...
    inner JOIN table_n-1
    ON table1.hash=table_n-1.hash 
        and table1.date = table_n-1.date 
        and table1.time = table_n-1.time
    left JOIN table_n
    ON table1.hash=table_n.hash 
        and table1.date = table_n.date 
        and table1.time = table_n.time
...
...
...
    ORDER BY table1.date
「DISTINCT」演算子のおかげで、次のような3行の結果が得られました
+---------+----------+------------+
|value1   |Null      | value3     |
+---------+----------+------------+ 
|value1   |Null      | Null       |
+---------+----------+------------+ 
|value1   |value2    | null       |
+---------+----------+------------+ 
|value1   |Null      | value3     |
+---------+----------+------------+ 
したがって、各行に少なくとも 1 つの Null があります。選択結果を 1 つの行にマージしてすべてのデータを取得するにはどうすればよいですか? 私は次のようなものを見たいです:
+---------+----------+------------+ 
|value1   |value2    | value3     |
+---------+----------+------------+
明らかに、最初の行の value3 は最後の行の value3 と同じです。したがって、Null だけで結果行が異なります。