使用自定义SQL创建数据集时,sql能在连接的mysql中执行,放在datasaes中就报错

下面sql我直接在mysql中执行是不报错的,在dataease中执行就会报错 SELECT
user_num,
COUNT() AS 买入次数,
SUM(CASE WHEN xinquan_money > real_money THEN 1 ELSE 0 END) AS 盈利次数,
SUM(CASE WHEN xinquan_money < real_money THEN 1 ELSE 0 END) AS 亏损次数,
SUM(CASE WHEN xinquan_money > real_money THEN 1 ELSE 0 END) / COUNT(
) AS 盈利概率
FROM
qiquan3
GROUP BY
user_num; 报错信息如下:

SQL执行失败,请检查表、字段、关联关系等信息是否正确并重新编辑。exception while executing query: While executing SQL [SELECT user_num, COUNT() AS 买入次数, CAST(COUNT() FILTER (WHERE xinquan_money > real_money IS TRUE) AS SIGNED) AS 盈利次数, CAST(COUNT() FILTER (WHERE xinquan_money < real_money IS TRUE) AS SIGNED) AS 亏损次数, CAST(COUNT() FILTER (WHERE xinquan_money > real_money IS TRUE) AS SIGNED) / COUNT(*) AS 盈利概率 FROM de_y3i6ji.qiquan3 GROUP BY user_num LIMIT 100 OFFSET 0] on JDBC sub-schema [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 ‘FILTER (WHERE `xinquan_money` > `real_money` IS TRUE) AS SIGNED) AS `盈利次�’ at line 1]

DataEase(v2.5) 和 mysql(v8.2) 版本 信息 ,通过1panel在线安装的

SUM(CASE WHEN xinquan_money > real_money THEN 1 ELSE 0 END)
改为 SUM(CASE WHEN xinquan_money > real_money THEN ‘1’ ELSE ‘0’ END)

其余也是这样修改,改完再试试

英文引号哈。