在SQL中汇总行

时间:2018-06-08 16:05:38

标签: sql

Table

我有一个这样的表,我试图将行汇总成一行。有没有办法在SQL中做到这一点,我能想到的唯一方法就是在同一个表上自我连接上做一堆

1 个答案:

答案 0 :(得分:1)

您可以enrollments": [ [ { "subject": { "assigner": "2.16.840.1.113883.3.3519.6.1.32", "value": "5" }, "identifiers": [ { "value": "52", "assigner": "2.16.840.1.113883.3.3519.6.1.32" } ], "_id": "5b1981dfac3d5a000fb92fc3", "progressNotes": [], "id": "5b1981dfac3d5a000fb92fc3" }, { "subject": { "assigner": "2.16.840.1.113883.3.3519.6.1.32", "value": "5" }, "identifiers": [ { "value": "7", "assigner": "2.16.840.1.113883.3.3519.6.1.32" } ], "_id": "5b1981dfac3d5a000fb92fc2", "progressNotes": [], } ], "id": "5b1981dfac3d5a000fb92fc2" } ] ], ID,并获取每列的group by值。

max()