datetime型を日付で `<=` 比較すると、その日の0時として扱われ、当日の日中が漏れる。 ```sql -- NG: 2026-11-20 15:30 が漏れる where created_at <= '2026-11-20' ``` 終了日は「翌日の0時より前」で絞る。 ```sql where created_at >= '2026-11-20' and created_at < '2026-11-21' ``` `23:59:59` 以下にする書き方だと、小数秒を持つ値が漏れることがある。