How does MySQL count the data of the day every 2 hours?


SELECT HOUR(APPLY_TIME) as Hour,count(*) as Count 
    FROM sesc_social_security 
   WHERE
    APPLY_TIME like "2018-01-23%"
    GROUP BY HOUR(APPLY_TIME) ORDER BY Hour(APPLY_TIME);

the above statistics are on an hourly basis. Could you tell me how to count every 2 hours?

Jun.21,2021

SELECT HOUR(APPLY_TIME) as Hour,count(*) as Count 
    FROM sesc_social_security 
   WHERE
    APPLY_TIME like '2018-01-23%' AND Hour % 2 = 0
    GROUP BY HOUR(APPLY_TIME) ORDER BY Hour(APPLY_TIME);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e50e3f-450ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e50e3f-450ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?