我想获取有关具有不同系统发起者和ID的合法名称的信息。那么,有人可以帮助我进行查询吗?
我的查询是:
SELECT ID,
SystemOriginator,
LegalName
FROM Institution
ORDER BY LegalName,
SystemOriginator
测试数据:
ID SystemOriginator LegalName
------ ------------------ -----------
2382 MLA FC STONE
2382 MLA FC STONE
2171 MLA XYZ
2871 New System XYZ
2171 MLA XYZ
我想要实现的结果是:
ID SystemOriginator LegalName
------ ------------------ -----------
2382 MLA FC STONE
2171 MLA XYZ
2871 New System XYZ
答案 0 :(得分:0)
select distinct ID,
SystemOriginator,
LegalName
from Institution
ORDER BY LegalName, SystemOriginator