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