TRANSFORM Sum(CCur(订单明细.单价*订单明细.数量*(1-订单明细.折扣)/100)*100) AS 金额
SELECT 产品.产品名称, 订单.客户ID, Year([订购日期]) AS 年度
FROM 产品 INNER JOIN (订单 INNER JOIN 订单明细 ON 订单.订单ID=订单明细.订单ID) ON 产品.产品ID=订单明细.产品ID
GROUP BY 产品.产品名称, 订单.客户ID, Year([订购日期])
PIVOT "第" & DatePart("q",[订购日期],1,0) & "季度" In ("第1季度","第2季度","第3季度","第4季度"); '红字部分需要手工加入 http://www.office-cn.net/forum.php?mod=viewthread&tid=56733&pid=280907&page=2&extra= (第19楼)