Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
HelloI have a select that will give me the activity per worker per hour
SELECTWorker,Weight,DateFROMPRODUCTIONORDER BY Worker,Date
I need get the Production per worker per Day
SELECTWorker,SUM(Weight) AS TotWeight,CAST(Date AS DATE) AS DateFROMPRODUCTIONORDER BY Worker,Date
But I need to get the elapsed time per day for each workerCan I do that in SQL with such Query ?Thank for your help
SwePeso
Patron Saint of Lost Yaks
30421 Posts
Posted - 2012-05-29 : 19:00:37
DATEDIFF(MINUTE, MIN(Date), MAX(Date)) AS IntervalN 56°04'39.26"E 12°55'05.63"
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2012-05-29 : 21:16:57
can there be breaks in between?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/