SELECT max(emp) as emp ,min(date_no) as date_no,count(*) from Time_text where emp in('02619') and date_no BETWEEN '2019-09-01' and '2019-09-30'
GROUP BY
emp, datediff(minute, 0, date_no)/10
Tag : .NET, Ms SQL Server 2012, Win (Windows App), VS 2017 (.NET 4.x)