Count no. of rows added last hours Mysql

Count no. of rows added last hours Mysql
[php]SELECT
COUNT(*) AS cnt
FROM
`user` `ur`
WHERE ur.added_time >= DATE_SUB(NOW(), INTERVAL 1 HOUR);
SELECT DATE_SUB(NOW(), INTERVAL 1 HOUR)[/php]

Output
count

Leave a Reply