68. Minimum Number of Missing Days

This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.

Given the following Employees table. This table displays various employees and the dates when they were absent from work. For example, Mary was on a vacation from January 1st to January 3rd.

CREATE TABLE employees
(employeeID int identity(1,1),
employeeName varchar(25),
departmentID int,
strt_date date,
end_date date)

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…