SELECT
`'Big Grid$'`.品类, round(sum(`'Big Grid$'`.付款金额),0) as 付款金额, round(sum(`'Big Grid$'`.销售数量),0) as 销售数量, round(sum(`'Big Grid$'`.买家数),0) as 买家数, round(avg(`'Big Grid$'`.客单价),0) as 客单价
FROM
`E:\OneDrive - business\Desktop\20190728.xlsx`.`'Big Grid$'` `'Big Grid$'`
WHERE
(`'Big Grid$'`.品类=? or ? = '全部')and(`'Big Grid$'`.门店名称=? or ? = '全部')
GROUP BY `'Big Grid$'`.品类