9 至此,我们会看到几行SQL语句,这就是刚刚那个交叉查询的语句,语句如下:
TRANSFORM Sum(物品库存表.[数量]) AS 数量之合计
SELECT 物品库存表.[颜色], Sum(物品库存表.[数量]) AS [总计 数量]
FROM 物品库存表
GROUP BY 物品库存表.[颜色]
PIVOT 物品库存表.尺寸;
在语句的最后一行,是"PIVOT"行,现在,我们在它的"PIVOT"中强行设定对列的顺序,把最后一行改成:
PIVOT 物品库存表.尺寸 IN ("XS","S","M","L","XL","XXL","XXXL")