Query posts and group them by day