How to query by timestamp in mysql

Total time: 1 minute 

This guide will simply cover how to find a data set by its timestamp including ranges. It will apply to mysql field that are of the "timestamp" type.

Here's everything you'll need to complete this guide:

mysql×1

DATE_SUB subtracts a specified time interval from a date. You can use DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 1 HOUR) to grab data from the most recent hour.