Sql statement to find difference of dates from group of records based on
I have a table like this
----------------------
ID   Mindate   Maxdate
1    1-12-81  1-15-81
1    1-18-81  1-18-81
1    2-9-81  3-1-81
2    5-2-81  7-5-81
2    8-18-81  8-18-81
2    9-9-81  10-21-81
3    3-12-81  4-15-81
3    6-17-81  8-19-81
------------------------
I need to find the Minimum date and MaxDate for each ID  under the condition that Difference between Minimum data and Maxdate should  be less than 90 days

-------
So the result I am expecting is something like this

-----------
ID  Mindate  MaxDate
1   1-12-81  3-1-81
2   8-18-81  12-21-81
3   6-17-81  8-19-81

 

Sql statement to find difference of dates from group of records based on
===

I have a table like this
----------------------
ID   Mindate   Maxdate
1    1-12-81  1-15-81
1    1-18-81  1-18-81
1    2-9-81  3-1-81
2    5-2-81  7-5-81
2    8-18-81  8-18-81
2    9-9-81  10-21-81
3    3-12-81  4-15-81
3    6-17-81  8-19-81
------------------------
I need to find the Minimum date and MaxDate for each ID  under the condition that Difference between Minimum data and Maxdate should  be less than 90 days

-------
So the result I am expecting is something like this

-----------
ID  Mindate  MaxDate
1   1-12-81  3-1-81
2   8-18-81  12-21-81
3   6-17-81  8-19-81

 
