Atif, it's seems like Imran has cracked this one!
Here we are with the solution;
SELECT Hire_T + 1
FROM ABC AS AC
WHERE NOT EXISTS
(
SELECT *
FROM ABC AS H
WHERE H.Hire_T = (AC.Hire_T + 1)
AND H.Number_Of_Employees_Hired > 0
)
AND Hire_T + 1 < (SELECT MAX(Hire_T) from ABC)
Can anyone else achieve the desired output in an alternate way?
Subscribe to:
Post Comments (Atom)
1 comment:
Year 2002 is not coming
Post a Comment