SELECT *FROM `table1`WHERE `field1`BETWEEN STR_TO_DATE('2020-07-01', '%Y-%m-%d %H')AND STR_TO_DATE('2020-10-27', '%Y-%m-%d %H')