Get every n-hour data from database with tolerance
问题 I have a MySQL database in which I write data every 10 minutes. i.e.: +---------------------+ | datetime | +---------------------+ | 2018-09-03 13:01:49 | | 2018-09-03 12:51:49 | | 2018-09-03 12:41:49 | +---------------------+ In my Python code I want to get just rows which are "exactly" n-hour old, i.e.: +---------------------+ | datetime | +---------------------+ | 2018-09-03 13:01:49 | | 2018-09-03 12:01:49 | | 2018-09-03 11:01:49 | | 2018-09-03 10:01:49 | | 2018-09-03 09:01:49 | | 2018-09