答案 0 :(得分:4)
SELECT MAX(rbr) maxRBR,
id, date,
MAX(pr1) maxPr1,
MAX(pr2) maxPr2,
....
FROM tableName
GROUP BY id, date
答案 1 :(得分:2)
SELECT id, dat, MAX(pr1) pr1, MAX(pr2) pr2, ...
FROM table
GROUP BY id, dat
答案 2 :(得分:2)
对于要合并非空值的每个字段,可以使用:
SELECT
id,
date,
COALESCE(field1),
COALESCE(field2)
FROM
table
GROUP BY
id