Completed

custom query

MS SQL SERVER:

id, 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

7, A1, 1-9-14 , 1-12-14 , $100

*ID - unique field

What i need :

Basically to see the maximum total consecutive days Service start date and end date.

for customer A1 it would be 11 days (1-5 plus 6-8 plus 9-12) and customer A2 it would be 5 6 days (3-5 plus 6-8) ... (claimid is unique PK).

tag each record so 1,2,3 so we know which records are connected to each other ... So for Cust A1 which Claim ids are selected and enumerate them.

Skills: Database Administration, Microsoft SQL Server, SQL

See more: what is ms sql, SQL Server administration, sql query field, sql server query, serv sql, sql query date, google map query custom labeled marker, sh404sef custom tag modul, sharepoint custom tag field control, query custom nutch, sharepoint custom query custom content types, sharepoint webpart content query custom field, sharepoint custom tag field, python extract custom tag, mysql query custom app, sql query filter parent record contain child records

About the Employer:
( 44 reviews ) Northridge, United States

Project ID: #6601845

Awarded to:

claytonEtillman

Hi! My name is Clayton, and I would love to help you with this. I see you need an MS SQL query to list the max number of consecutive days a customer uses your service. You need the query to add days across claims as More

$25 USD in 1 day
(0 Reviews)
0.0

2 freelancers are bidding on average $46 for this job

olegshlepchenko

A proposal has not yet been provided

$66 USD in 1 day
(0 Reviews)
0.0