SELECT DISTINCTROW 类别.类别名称, 产品.产品名称, Sum(CCur(订单明细.单价*[数量]*(1-[折扣])/100)*100) AS 产品销售额, "季度" & DatePart("q",[发货日期]) AS 发货季度
FROM (类别 INNER JOIN 产品 ON 类别.类别ID = 产品.类别ID) INNER JOIN (订单 INNER JOIN 订单明细 ON 订单.订单ID = 订单明细.订单ID) ON 产品.产品ID = 订单明细.产品ID
WHERE (((订单.发货日期) Between #1/1/1997# And #12/31/1997#))
GROUP BY 类别.类别名称, 产品.产品名称, "季度" & DatePart("q",[发货日期]);