I have a timestamp value in my table and it's set to on update current timestamp.
It updates itself when user is doing x work.
I want to count how many users did x work in last 30 minutes. What's the mysql query that I need?
I have a timestamp value in my table and it's set to on update current timestamp.
It updates itself when user is doing x work.
I want to count how many users did x work in last 30 minutes. What's the mysql query that I need?
You should use the count aggregate function your query
select
count(timestampColumnName)
from
yourtable
where
timestampColumnName>date_sub(now(), interval 30 minute)
// and any other conditions as needed