Either of the following will work, (I prefer the latter):
SELECT
MAX(DATEDIFF(
(SELECT MIN(s2.dateCompletion)
FROM staff s2
WHERE s2.dateCompletion >= s.dateCompletion AND s2.id != s.id)
, dateCompletion))
from staff s;
In the above example, for each record, you find the next completed project, do a datediff, and then take the max.
In the example below, I use joins to do the same thing. If you're dataset is really big, you might be better off creating a temporary table and get rid of the derived table.
SELECT
MAX(DATEDIFF(s2.dateCompletion, s.dateCompletion))
FROM staff s
JOIN staff s2 ON s2.dateCompletion = (SELECT MIN(s3.dateCompletion)
FROM staff s3
WHERE s3.dateCompletion >= s.dateCompletion
AND s3.id != s.id)
Also, as you're measuring maximum period of inactivity, would you also like to include the date difference between the MAX(dateCompletion) and CURDATE(), then use the following:
SELECT
MAX(DATEDIFF(COALESCE(s2.dateCompletion, CURDATE()), s.dateCompletion))
FROM staff s
JOIN staff s2 ON s2.dateCompletion = (SELECT MIN(s3.dateCompletion)
FROM staff s3
WHERE s3.dateCompletion >= s.dateCompletion
AND s3.id != s.id)