Given a table with a column that contains a timestamp, I would like to count the number of instances where the TIMEDIFF(now(), timeStamp) is greater than some value. The issue I ran into is implementing this all into a statement. My efforts:
SELECT COUNT*()
FROM sometable
WHERE (SELECT TIMEDIFF(now(),column_from_sometable) > 10
I'm just not quite sure how to use the TIMEDIFF in the where statement to use it for a comparison. (Apparently you must use SELECT to call the method, and then I'm just not sure how to access the column from sometablein that statement).
COUNT*()a typo? Did you meanCOUNT(*)?