Looking for a query to find first/last dates in overlapping dates...

Advertisement
Hi,
I'm looking for a query to find the first dates and last dates in a table conaining overlapping dates.
I have a subscription table which has for each Customer start and end date for different subscriptions.
I want to know the different ranges of date where there is subscriptions active.
so if the table has this:
CustID, Start date, end date
1, 2008-01-01, 2012-06-06
1 ,2009-01-01, 2011-01-01
1, 2011-01-01, 2013-02-02
1, 2013-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
I want to produce this result:
custid, range start, range end
1, 2008-01-01, 2013-08-08
1, 2014-01-01, 2014-04-04
the first row is the range identified from the 4 rows in my subscription table.
thanks :)
Advertisement

Replay

I think I found it...
http://stackoverflow.com/questions/5213484/eliminate-and-reduce-overlapping-date-ranges
let me try this method
Hi,
m writing to follow up with you on this post. Thanks for you posting a reply to share your workground. Was the problem resolved after performing the above link? If you are satisfied with the above solution, I’d like to mark this issue as "Answered".
Please also feel free to unmark the issue, with any new findings or concerns you may have.
Thanks,
Sofiya Li
If you have any feedback on our support, please click here.
Sofiya Li
TechNet Community Support

Looking for a way to find out the x,y coordinates of a string inside a PDF

Hi! I'm looking for a way to find out the x,y coordinates of a string inside a PDF (with free java api's only) I got a pdf, and a string to find inside it, what i need to do is to get this string x,y position inside that pdf.... If any one knows of s

Looking for an app that finds a restaurant centrally located to me

looking for an app that finds a restaurant centrally located to me and friendsTry the App store: 1. In search type R followed by E followed by S followed by T followed by A followed by U followed by R followed by A followed by N followed by T. 2. Cli

SQL query to find out last login for each database

Hi everybody, I have a view with following columns: DatabaseSid, lastLogin, firstLogin. I want to now the newest last_login date for every database. SID First Login Last Login e.g. Database1, 11.11.2011, 01.12.2011 Database1, 01.04.2012, 01.05.2012 D

Looking for Pages script to find "return" "return" and delete 2nd one only

Looking for a Pages Applescript to find "return" "return" and delete 2nd one only. Perform on entire document. ThanksFunny, the same question was asked on 2011/11/12 in http://macscripter.net/viewtopic.php?id=37477 Nigel Garvey posted

My itunes won't update. It's looking for 10.6.0.40. Last time it tried to update, I downloaded the msi to my desktop and I deleted it within the last six months. Now I can't uninstall or update.

The last time my iTunes couldn't update. I used support from Itunes and downloaded it my desktop. My mistake. Because without thinking, I deleted it within the last six months from my desktop, without thinking I'd need it later. For the past month I'

Find first & last day of the week from given date

Hi All, I have the below input query, WITH TEM AS   ( SELECT '11-JAN-13' DT from dual union   SELECT '16-JUN-12' from dual union   SELECT '04-JUL-12' from dual union   SELECT '09-JAN-13' from dual union   SELECT '10-JAN-13' from dual union   SELECT '

Looking for some advice on my first product

hello there just bought myself the new SB Surround 5. for my new laptop . im lookking to do a bit of basic music recording but i have a new mic and im wondering if i need a mic pre amp for this ? most of the recording will be done by mic also when i

Finding first occurrence of a numeric data in a string

Hi Can you please suggest me in this. I have a data set like following.. 'LOMBORD 123' 'LOMBORDD' 'LOMBORDD45' Here how i will ffind the first occurance of the numeric valu in each string there may be a space charecter like 'LOMBORD 123' . As my data

Sql query to find dependencies for a table

Hi All, I am having a table (REPT_ALL) with dependent objects on it ( child tables, indexes, constraints, views, synonyms, sequences , packages,procedures,functions,triggers). I want the query to find out all the above dependencies for the above tabl

Looking for a new laptop

Hi. Because of an unexpected hardware problem I'am looking for a new laptop. The last weeks I've informed me a bit of some laptops but I'am not really sure: My favorite is Samsung R560-Aura P8400 Madril but my last notebook had an ATI graphic card an

Query to find universe modified date and modified by

Hi,   Is there a way we can query to find universe last modified by and modified date?. I was not able to find a field to pull "modified by" info. ThanksSreedhar, I'm not exactly sure how you're going to get from Point "A" to Point &qu

One time Vendor _ Look for Invoices by VAT number

Hi Guys, I am looking for a way to find out the invoices for one time vendor base on VAT number. I need a standard report, because I know that I can search the table BSEC, but I am wondering whether SAP standard offers you the option to look these in

Looking for istructions/examples for using winsock in Labview

I'm looking for instructions or examples of using winsock in Labview. Looking in the NI examples I found an example using winsock UDP with Labwindows but nothing for Labview. Is the same function named different in Labview?Thanks for the links. Unfor

Tutorials for MVC, Data Controls, and Data Bindings

I am looking for some good tutorials on: Model View Controller concept Creating Data Controls from Java Beans Creating and Using Data Bindings We are using JDeveloper, but do not want to use ADF as we want more control than ADF offers. Thanx PamJust

Finding first and last members of a group set

Is there any example how to use 'first' and 'last' functions in an sql query ? I have tried to execute a query like this on the scott.emp table : select deptno,min(sal),max(sal),first(sal) from emp group by deptno; but I always get this message: ERRO

Function for finding first day of the month !!

Hi, I know we have function to find the last day(DD) of the month. Do we have any functions for finding the first day of the month ??? if not is there any way i can find the first date(DD) of the month . Bcoz i m trying to incorporate the logic for f

Looking for a people finder app

I'm looking for an iPhone app (I have a 3G) that will allow me to easily send my current location to someone else via e-mail or sms (it's OK if they have to have the same app installed) so they can see where I am on a map, helping them find me. I'd u

How to find out last update date for business partner's marketing attribute

How to find out last update date for business partner's marketing attribute?? Im freshie for SAP Application and im assigned to find out last update date for marketing attribute changed which table is involved?? Yours kindness will be appreciated tha

With Adobe Flash, the image is looking for a "zoom" setting and does not find it. The result is that the imbedded image is too large for the space allowed. Is there a zoom setting for Firefox?

When running FB game apps, the image loaded is too large for the FB space. The program looks for a "zoom" setting and does not find it. This was from the error screen. I have not been able to locate where the image zoom is located (found the fon