Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Hope all is doing great.
I came across a scenario where i need your help.
I need to count Total unique times that any user has witout entering a paid Contest Exactily that may days( no more no less).
Example :- If a user enters a paid contest, then does not enter a paid contest for Exactly between 24-48 hours, that would be counted as 1 day. if they enter a paid contest, then don't enter one for Exactly between 72-96 hours, that would be counted as 3 day.we will be counting EACH and EVERY unique time this happens for every single User.
i attached the data set.
Hope this group will help.
Thanks
Ravi
Hi All,
Do anyone know how can i resolve the above scenario?
Thanks
mercerisms
which of the two fields specify " If a user enters a paid contest" ?
can you you also post expected output for the attached sample?
From how much i am able to understand, try this:
A:
Load * from (Date Source)
where len(cash_bet)>0 or len(winnings_bet)>0 ;
Noconcatenate
MainTable:
Load * from (Date Source);
Inner Join
B:
load *, if(user_id=previos(user_id),floor(num(Previous(created)-created)),null()) as number_of_days
resident A order by user_id asc, created desc;
Drop Table A;
Akash Dhandhi
Please accept it as a solution, if it solves your issue.