如下我创建了一张试图,我想group by按照RD.SKU分组求和RD.QTYRECEIVED字段为sumsum,但是我想显示select的六个字段,而不是就显示RD.SKU和sumsum,说的简单点就是,sumsum字段想实现相同RD.SKU的RD.QTYRECEIVED和
// 请把代码文本粘贴到下方(请勿用图片代替代码)
CREATE OR REPLACE VIEW aaa AS
SELECT
R.WHSEID, RD.STORERKEY, RD.SKU, RD.QTYRECEIVED, RD.LOTTABLE04+8/24 AS LOTTABLE04, sum(RD.QTYRECEIVED) as sumsum
FROM ......省略关联表
group by
R.WHSEID, RD.STORERKEY, RD.SKU, RD.QTYRECEIVED, RD.LOTTABLE04;
相关分类