由于某种原因,我的查询在mysql中出错,但是当我取消查询的一部分时,它的工作正常。当我取消, wordsCount <= (5 * 1.5)
时,查询运行得很好。我一直看着它,又一次,但我只是没有看到错误。我的查询出了什么问题?
SELECT input
,response
,((responseX REGEXP '[[:<:]]can[[:>:]]') + (responseX REGEXP '[[:<:]]i[[:>:]]')) AS wordsFoundR
,(LENGTH(response) - LENGTH(REPLACE(response, ' ', '')) + 1) AS wordsCount
FROM allData
HAVING wordsFoundR > 0
,wordsCount <= (5 * 1.5)
ORDER BY wordsFoundR DESC
,rand()