Please turn JavaScript on
header-image

SQLTeam.com Forums - Latest posts

Want to know the latest news and articles posted on SQLTeam.com Forums - Latest posts?

Then subscribe to their feed now! You can receive their updates by email, via mobile or on your personal news page on this website.

See what they recently published below.

Website title: SQLTeam.com Forums

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  0.55 / day

Message History

SQL is a skill that data analysts need. It helps data analysts to query, manipulate and analyze data sets that are stored in databases.

Knowing SQL is really important because it helps you get information from data. This information is very useful for businesses to make decisions.

I think taking a data analytics course in Mumbai is an idea if you want to improve...


Read full story

Thanks, I must not be explaining the requirement clearly enough.

In your data for employee 1, there is only one gap in your data between, which is between 17:00 & 18:00.

Your results for 94 & 384 mins gaps are not valid because the gap between 07:10 to 08:44 is within 06:44 & 15:48. The gap between 15:48 and 16:00 is below 15 mins removing the gap be...


Read full story

hi

hope this helps

welcoming any comments

create sample data script (click for more details)

t-sql code

DECLARE @targetYearMonth INT = 202508; ;WITH md AS ( SELECT dt1, ...

Read full story

hi

hope this helps

shorter version of the same code posted above

SELECT EmployeeFK, MIN(TimeOn) AS BlockStart, MAX(TimeOff) AS BlockEnd, LEAD(MIN(TimeOn)) OVER (PARTITION BY EmployeeFK ORDER BY MIN(TimeOn)) AS NextStart, DATEDIFF(MINUTE, MAX(TimeOff), LEAD(MIN(TimeOn)) OVER (PARTITION BY EmployeeFK ORDER BY MIN(TimeOn))) AS GapMinutes FROM WorkOrderColl...

Read full story

hi

greater than 15 min intervals

hope this helps

create sample data script (click for more details) ;WITH Blocks AS ( SELECT EmployeeFK, MIN(TimeOn) AS BlockStart, MAX(TimeOff) AS BlockEnd FROM WorkOr...

Read full story