Maison >base de données >tutoriel mysql >Sql Server按小时进行分组统计
SqlServer 无 SELECT DATEADD(hh,DATEDIFF(hh,0,Date),0) [Hour] FROM [t1] group by DATEDIFF(hh,0,Date)
Sql ServerSELECT DATEADD(hh,DATEDIFF(hh,0,Date),0) [Hour] FROM [t1] group by DATEDIFF(hh,0,Date)