TRANSFORM Sum(CCur([订单明细].[单价]*[数量]*(1-[折扣])/100)*100) AS 产品金额
SELECT 产品.产品名称, 订单.客户ID, Year([订购日期]) AS 订购年份
FROM 订单 INNER JOIN (产品 INNER JOIN 订单明细 ON 产品.产品ID = 订单明细.产品ID) ON 订单.订单ID = 订单明细.订单ID
WHERE (((Year([订购日期]))=[请输入查询年度]))
GROUP BY 产品.产品名称, 订单.客户ID, Year([订购日期])
PIVOT "第" & DatePart("q",[订购日期],1,0) & "季度" In ("第1季度","第2季度","第3季度","第4季度");