题目
有如下一组数据G0426
相同OrderNumber只取一条ReSumCost的结果,希望得出以下结果
测试数据
代码语言:javascript复制CREATE TABLE G0426
(Carrier_Name NVARCHAR(10) NOT NULL,
OrderNumber VARCHAR(20) NOT NULL,
ReSumCost DECIMAL(10, 2) NOT NULL
);
INSERT INTO G0426 VALUES('临时', 'JOY19080300003', 170)
INSERT INTO G0426 VALUES('张三', 'JOY19080300003', 170)
INSERT INTO G0426 VALUES('临时', 'JOY19080300004', 196.5)
INSERT INTO G0426 VALUES('张三', 'JOY19080300004', 196.5)
INSERT INTO G0426 VALUES('临时', 'JOY19080300006', 458.8)
INSERT INTO G0426 VALUES('张三', 'JOY19080300006', 458.8)
INSERT INTO G0426 VALUES('李四', 'JOY19080300007', 272)
INSERT INTO G0426 VALUES('李四', 'JOY19080300008', 315)
INSERT INTO G0426 VALUES('临时', 'JOY19080300008', 315)