在SQL编辑器中使用变量筛选器时,未选择变量则不会报错,但是选择了变量(比如选择了某一个组)就很出现报错,SQL语句:SELECT
a.Date,
a.quantity,
b.组均总销量
FROM
(SELECT Date,quantity FROM ads_temp WHERE group
= “3-2-C”) a
INNER JOIN (SELECT Date,round(sum(quantity) / 16, 0) 组均总销量 FROM ads_temp GROUP BY Date) b ON a.Date = b.Date;
[[WHERE a.Date == {{shijian}}]]
报错:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE a.Date == ‘2020-12-16’’ at line 6