Hi,

I have some records which include a source_id field which is an integer and
a datetime field. I want the records to be ordered such that the adjacent
records should not have the same source ids. It should perform some sort of
round robin on the records with the source_id as kay and they should be
sorted by date.

For example:
[1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,4] after the sort should give -->
[1,2,3,4,1,2,3,1,2,3,1,2,3,1,2,2] and these should be sorted by datetime.
meaning the first '1' should be the latest '1' and the last '1' should be
the oldest '1'. I was wondering if it was possible to write a boost
function for such a requirement.

Thanks in advance!

Sai

Reply via email to