Categories
Mastering Development

Select employees, who took 5 or more days of vactions in a row

I need to select staffId (employees), who took 5 or more days of vactions in a row

select * from dbo.EmployeeRecords where reasonId = 3 and isPaid = 1

reasonId = 3 means vacation

How can I do it?

Leave a Reply

Your email address will not be published. Required fields are marked *