此 SQL 修复了您的 SQL :-),我认为返回您所追求的答案:
DECLARE @temp table (ID INT, Number1 INT, Number2 INT);
INSERT INTO @temp (ID,Number1, Number2) VALUES (111, 123, 10)
INSERT INTO @temp (ID,Number1, Number2) VALUES (111, 223, 10)
INSERT INTO @temp (ID,Number1, Number2) VALUES (111, 323, 10)
INSERT INTO @temp (ID,Number1, Number2) VALUES (112, 123, 11)
INSERT INTO @temp (ID,Number1, Number2) VALUES (112, 223, 11)
INSERT INTO @temp (ID,Number1, Number2) VALUES (112, 333, 11)
INSERT INTO @temp (ID,Number1, Number2) VALUES (113, 124, 12)
INSERT INTO @temp (ID,Number1, Number2) VALUES (113, 126, 12)
INSERT INTO @temp (ID,Number1, Number2) VALUES (114, 128, 121)
SELECT DISTINCT T1.ID, T1.Number1, T1.Number2
FROM @temp T1
JOIN @temp T2 ON T1.ID = T2.ID AND T1.Number1=(SELECT MAX(Number1) FROM @temp T3 WHERE T3.ID=T1.ID)
一切顺利,迈克尔