[步骤]
[结果]
Error querying database. Cause: java.sql.SQLSyntaxErrorException: 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 ') group by tag_id) b where a.tag_id=b.tag_id and a.en' at line 4 ### The error may exist in file [D:\Test\rydw\personposition\target\classes\mybatis\interfaces\PosiStayTimeMapper.xml] ### The error may involve defaultParameterMap ### The error occurred while setting parameters ### SQL: select a.tag_id,sum(case when a.leave_time is null then TIMESTAMPDIFF(minute,a.entry_time,now()) else case when stay_time is null then 0 else stay_time end end) stay_time from posi_stay_time a, (select tag_id,max(entry_time) entry_time from posi_stay_time where sub_ap not in () group by tag_id) b where a.tag_id=b.tag_id and a.entry_time > b.entry_time and a.sub_ap in () group by a.tag_id ### Cause: java.sql.SQLSyntaxErrorException: 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 ') group by tag_id) b where a.tag_id=b.tag_id and a.en' at line 4 ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: 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 ') group by tag_id) b where a.tag_id=b.tag_id and a.en' at line 4
[期望]