How many records have the key n times

no

go make yourself a nice cup of tea, take a break from the computer, then re-read the entire thread (especially posts #6 through #9)

you ~must~ understand why your query in post #37 is producing the wrong results

SELECT count( * ) AS howCount
FROM myTable
WHERE 3 =( CHAR_LENGTH( say ) - CHAR_LENGTH( REPLACE( say, 'city', '' ) ) )/ CHAR_LENGTH( 'city' ) 

I found the query above works fine.
Does it have any flaws? :joy:

Thank you.

I admire not only your endurance but also mime.

wow, you fixed several things on your last step

especially how to debug errors involving missing parentheses, and how to use parentheses to ensure correct order of arithmetic operations

congratulations

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.