79441740

Date: 2025-02-15 15:09:17
Score: 0.5
Natty:
Report link

If you only want to identify dates which have 2 years difference then you can do with below query which will even not require self join:

DECLARE @MinDate DATE = (SELECT MIN(date_start) FROM t)
SELECT date_start
FROM t
WHERE DATEDIFF(DAY, @MinDate , date_start) % 365 = 1
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Harsh Varde