0
我有一張表,其中數據將每隔15分鐘插入一次。所以時間戳將作如下如何使用sql server獲取兩個時間戳之間的數據
表名稱:tblresultset
ID Date count
1 2017-05-03 1:15:00 10
2 2017-05-03 1:16:00 11
3 2017-05-03 1:27:00 2
4 2017-05-03 1:28:00 3
5 2017-05-03 1:29:00 6
6 2017-05-03 1:30:00 8
7 2017-05-03 1:31:00 2
8 2017-05-03 1:32:00 1
9 2017-05-03 1:33:00 2
Now I am looking for the query which will get me the total count from
2017-05-03 1:15 to 2017-05-03 1:30
我一定要得到這種計數在給定的日期,每次15分鐘間隔。
請問有人能幫我嗎?
你想'1:15'到'1:30',然後'1:30'到'1:45',....? – TriV
您是否在尋找特定的時間間隔(即017-05-03 1:15到2017-05-03 1:30),還是您希望所有數據按15分鐘的時間間隔進行分組? – FrankerZ