我有以下查询:
SELECT VoucherId,
PosDateEntered,
SUM(VoucherFaceValue) AS ValueIssued,
SUM(AmountUsed) AS ValueReedeemed,
RVtransactionAmount
FROM [dbo].[LoyaltyVoucherTransactionDetails]
WHERE VoucherId = '2000702'
GROUP BY PosDateEntered, VoucherId, RVtransactionAmount
这将返回以下数据:
我怎样才能把它变成下面的结果?
我正在使用 SSMS 2014