SELECT COUNT(id) FROM sri_blogposts WHERE user='145' AND blog='143' AND allowed=1 AND active=1 AND date>='2024-06-01' AND inlatest=1 AND date<='2024-06-31'
Incorrect DATE value: '2024-06-31'