need some help doing SQL date calculations:
In a table I have patients who are older than 18 and died from a certain disease (table a). In another table I have Patients of the same disease and the earliest date they were diagnosed with this disease (table b).
What i need to know is if 12 months has passed since they were diagnosed and when they died.
Can someone assist me in performing this date calculation.
The column in table a for date is indexdate and column is deathdate in table b for when they died.
Appreciate any help
Table A:
patientid--age--deathdate
1 20 11/05/2016
2 19 10/09/2015
Table B:
PatientID--indexdate
1 01/02/2015
2 08/03/2014
So essentially all i want to check is if 12 months has passed between indexdate and deathdate.