Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a database with the registry of people from a food service. The food service is free, but you can only take one service per day.
I need to find record that are duplicated and mark them.
What i Have is something like:
1 Person1 12/05/2014 11:01:00 NEED TO HAVE A MARK (Duplicated)
2 Person1 12/05/2014 11:01:30 NEED TO HAVE A MARK (Duplicated)
3 Person2 12/05/2014 11:01:30
n ...
So in this case, I have to mark the registry 1 and 2, because it is from the same person and in the same day.
Mark the registry 2 is not a big deal, cause I can use Peek or Previous.. But how do I mark the registry 1?
Thank you!!
Attached with answer. Check out the back-end script for how to handle it.
Hope it helps.
Thanks
Attached with answer. Check out the back-end script for how to handle it.
Hope it helps.
Thanks
t:
load *, date(floor(dattim)) as dat inline [
id, per, dattim, comment
1 , Person1 , 12/05/2014 11:01:00, NEED TO HAVE A MARK (Duplicated)
2 , Person1 , 12/05/2014 11:01:30, NEED TO HAVE A MARK (Duplicated)
3 , Person2 , 12/05/2014 11:01:30,
];
left join (t)
load per, dat,
if(count(id)>1,1,0) as dupl
Resident t
group by per, dat;