Home >Database >Mysql Tutorial >Sql Server按小时进行分组统计

Sql Server按小时进行分组统计

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 14:57:203100browse

SqlServer 无 SELECT DATEADD(hh,DATEDIFF(hh,0,Date),0) [Hour] FROM [t1] group by DATEDIFF(hh,0,Date)

Sql Server 
SELECT DATEADD(hh,DATEDIFF(hh,0,Date),0) [Hour]
  FROM [t1] 
  group by DATEDIFF(hh,0,Date)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn