我有一个运行良好的以下选择查询
SELECT
division,
division_name,
object_account,
account_description,
Sum(value) AS PreferedSpend
FROM jde_dw.blanket_rpt
WHERE division = 02
AND vendor_type = 'PV'
AND month = 07
AND year = 2013
GROUP BY division, division_name, object_account, account_description
ORDER BY division
现在我想添加一个显示总支出的列,它将与上面的查询相同,但在 where 语句中没有 vendor_type 条件。
所以最后的查询将显示 Division, Division_name, Object_account, Account_Description, Value( as preferred) 和 value as( 包括所有内容的总计)
我怎样才能做到这一点?