标签: sql-server
想要通过ID将行合并为2,需要通过跳过空值来合并列DocStatus和Release Date。
ID
DocStatus
Release Date
答案 0 :(得分:1)
基本上你可以使用GROUP BY和聚合函数。类似下面的内容
SELECT ID, somecol, max(another_column), min(yet_another_column) FROM yourtable GROUP BY ID, somecol