For some reason, my query is getting an error in mysql, but when I take off a part of the query, it works just fine. When I take off , wordsCount <= (5 * 1.5) the query runs just fine. I kept looking over it again, and again, but I'm just not seeing the error. What is wrong with my query?
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()
 
    