-1
我想问你们一些帮助。我正在做每日销售报告,并得到GROUP BY条款的一些问题。TSQL组BY条款
这里是示例表:
ItemName Quantity Price
===========================
ItemA 5 150.00
ItemB 6 100.00
ItemA 2 125.00
ItemD 1 110.00
ItemB 1 100.00
ItemD 3 110.00
,我想有格式如下结果:
RESULT:
ItemName Quantity Price
=============================
ItemA 2 125.00
ItemA 5 150.00
ItemB 7 100.00
ItemD 4 110.00
正如你所看到的,意达,因为它在不同的价格出现了两次。
谢谢,我是不能添加价格领域Group By子句。 –