Find consecutive days of service without a day break in between <p>service table:</p> <pre><code>claimid, customerid, serv-start-date, service-end-date, charge 1, A1, 1-1-14 , 1-5-14 , $200 2, A1, 1-6-14 , 1-8-14 , $300 3, A1, 2-1-14 , 2-1-14 , $100 4, A2, 2-1-14 , 2-1-14 , $100 5, A2, 2-3-14 , 2-5-14 , $100 6, A2, 2-6-14 , 2-8-14 , $100 </code></pre> <p>Problem: Basically to see the maximum total consecutive days Service start date and end date.<br> for customer A1 it would be 8 days (1-5 plus 6-8) and customer A2 it would be <s>5</s> 6 days (3-5 plus 6-8) ... (claimid is unique PK).</p> <p>Dates are in m-d-yy notation.</p>