mysql-select-by-recent-temporal-window

Temporal Selection

To select by a recent rolling temporal window, say -- "in the last 30 minutes," try something like:

SELECT COUNT(*) FROM mytable WHERE lastupdate > DATE_SUB(NOW(), INTERVAL 30 MINUTE);

Follow on Twitter


LinkedIn
Facebook
Notchup, Member 74311




Copyright (C) 2008, Mike McCreavy
[ x ] Console
Timestamp Message
hey
[ x ] Socket Console
Timestamp Message
hey