Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have scenario having date field and phone numbers repeating thrice/ 4 times, i want to find interval between each of them; how can i find it in same date column and show them in chart
table format:
phno time
1234567890 3/4/2013 08:00:00
1234567890 3/5/2013 09:00:00
1234567890 3/5/2013 15:00:22
can you please provide the sample expected output
It is something like want to show bars for 3/4 times for same ph no and showing time between them as trend
try this:
load the table grouped by phone number.
in your table, add this field:
if(phno <> peek (phno,-1), 0, calltime - peek(calltime, -1)) as difference
in a bar chart, use phno and calltime as dimensions and sum(difference) as expression.
below you find the script to generate interval;
my date format is SET DateFormat='DD/MM/YYYY';
I don't understand the chart you would like to have
load
phno,
time,
if(phno<>peek(phno), null(), interval(time - peek(time), 'DD HH mm ss')) as timediff,
if(phno<>peek(phno), null(), interval#(time - peek(time))) as timediff2;
LOAD * INLINE [
phno , time
1234567890 ,3/4/2013 08:00:00
1234567890 ,3/5/2013 09:00:00
1234567890 ,3/5/2013 15:00:22
];
Hey Praveena,
Check out the attached doc and see if it helps.
Thanks
AJ