mysql 数据库
2.3.0社区版
运行下面 sql
select
DE_DATE_FORMAT(jiuzhenrq, 'yyyy-MM-dd') `date`,
count(*) as `num`
from
zj_jiuzhenxx
where
yuanquid = 2
and
jiuzhenrq >= CURRENT_DATE - INTERVAL '59' DAY
group by
`date`
报错(单独在 mysql 下是正常显示的)
SQL执行失败,请检查表、字段、关联关系等信息是否正确并重新编辑。Error while preparing statement [SELECT * FROM (SELECT `DE_DATE_FORMAT`(`jiuzhenrq`, 'yyyy-MM-dd') AS `date`, COUNT(*) AS `num` FROM `s_a_957427878042144768`.`zj_jiuzhenxx` WHERE `yuanquid` = 2 AND `jiuzhenrq` >= CURRENT_DATE - INTERVAL '59' DAY GROUP BY `date`) tmp LIMIT 100 OFFSET 0] [Column 'date' not found in any table]
不报错
select
DE_DATE_FORMAT(jiuzhenrq, 'yyyy-MM-dd') `date`,
count(*) as `num`
from
zj_jiuzhenxx
where
yuanquid = 2
and
jiuzhenrq >= CURRENT_DATE - INTERVAL '59' DAY
group by
DE_DATE_FORMAT(jiuzhenrq, 'yyyy-MM-dd')