Please count every 10 minutes for the time period starting from 7 o'clock in the morning every day.
Solution Ideas:
I have done a month before, that is, every 3 months in groups, in fact, is the same. But maybe, the overall data volume is a problem for the General Assembly. If you're just asking for a day, that's absolutely fine.
"1" If only that day, then you take the day seven points, calculate the day all the time and its minute difference, then group by minute difference/10 can
"2" If it is all the data, then you add the time period condition in the where, and then find the earliest time point for the minute difference between the current time and the earliest point of the group by/10
This friend is dead write, this article takes the day for example AH
"1" Build a table and test it.
"2" Using minute difference/10 grouping
"3" display is not intuitive, converted into time display
SQL Server Group statistics in 10-minute numbers