Last post Jun 04, 2013 09:47 AM by Wael Abu Rezeq
Jun 03, 2013 10:34 AM|Wael Abu Rezeq|LINK
Jun 03, 2013 10:52 PM|Lannie|LINK
What database are you using
and does it have Analytic Functions so that you can PARTITION and ORDER customers creating a WINDOW of the customer so you can do inactivity calculations for that customer. (Oracle has many Analytic Functions)
Still a bit unclear on the end game.
Restate you desired business functionality.
For a given customer are you looking for the greatest period of inactivity? Or some other dimension, like rank ordering periods of inactivity.
Jun 04, 2013 09:24 AM|Wael Abu Rezeq|LINK
thanks for your reply,
1)I am using Oracle
2) I don't think that we need to partition, we have just done the oreder by to sort customer with thier dates.
3) currently, I am looking to get the output as I wrote (Table 2) before then many functions can be applied..
Jun 04, 2013 09:47 AM|Wael Abu Rezeq|LINK
The below did solve my problem, many thanks for your kind co-operation
lead ( expression [, offset [, default] ] )
over ( [ query_partition_clause ] order_by_clause )