やりたいこと
MySQL, MariaDBにおいて、時間ごとにグループ化する。
前提条件
概要
手順
select date_format(列名, '%H:00:00') as time, count(*) as count
from テーブル名
group by date_format(列名, '%H');
MySQL, MariaDBにおいて、時間ごとにグループ化する。
select date_format(列名, '%H:00:00') as time, count(*) as count
from テーブル名
group by date_format(列名, '%H');