xenou,
I need to know the day interval of each line where a barcode matches. The sql gives me the interval between the min Date_Warranty and the max Date_Ent.
[TABLE="width: 271"]
<colgroup><col width="81" style="width: 61pt; mso-width-source: userset; mso-width-alt: 2872;"> <col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2247;"> <col width="76" style="width: 57pt; mso-width-source: userset; mso-width-alt: 2702;"> <col width="100" style="width: 75pt; mso-width-source: userset; mso-width-alt: 3555;"> <col width="42" style="width: 31pt; mso-width-source: userset; mso-width-alt: 1479;"> <tbody>[TR]
[TD="width: 81, bgcolor: transparent"]RA_Num[/TD]
[TD="width: 63, bgcolor: transparent"]BarCode[/TD]
[TD="width: 76, bgcolor: transparent"]Date_Ent[/TD]
[TD="width: 100, bgcolor: transparent"]Date_Warranty[/TD]
[TD="width: 42, bgcolor: transparent"]MTBF[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RS08280184[/TD]
[TD="bgcolor: transparent"]A-335663[/TD]
[TD="bgcolor: transparent, align: right"]8/28/2018[/TD]
[TD="bgcolor: transparent, align: right"]1/31/2019[/TD]
[TD="bgcolor: transparent, align: right"]6[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RT02060109[/TD]
[TD="bgcolor: transparent"]A-335663[/TD]
[TD="bgcolor: transparent, align: right"]2/6/2019[/TD]
[TD="bgcolor: transparent, align: right"]3/28/2019[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RT02190119[/TD]
[TD="bgcolor: transparent"]A-335757[/TD]
[TD="bgcolor: transparent, align: right"]2/19/2019[/TD]
[TD="bgcolor: transparent, align: right"]3/14/2019[/TD]
[TD="bgcolor: transparent, align: right"]5[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RT03190145[/TD]
[TD="bgcolor: transparent"]A-335757[/TD]
[TD="bgcolor: transparent, align: right"]3/19/2019[/TD]
[TD="bgcolor: transparent, align: right"]4/22/2019[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RS12280034[/TD]
[TD="bgcolor: transparent"]A-335780[/TD]
[TD="bgcolor: transparent, align: right"]12/28/2018[/TD]
[TD="bgcolor: transparent, align: right"]3/8/2019[/TD]
[TD="bgcolor: transparent, align: right"]14[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RT03220089[/TD]
[TD="bgcolor: transparent"]A-335780[/TD]
[TD="bgcolor: transparent, align: right"]3/22/2019[/TD]
[TD="bgcolor: transparent, align: right"]4/30/2019[/TD]
[TD="bgcolor: transparent, align: right"]6[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]RT05060079[/TD]
[TD="bgcolor: transparent"]A-335780[/TD]
[TD="bgcolor: transparent, align: right"]5/6/2019[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[/TR]
</tbody>[/TABLE]