Hi,
Here is my situation:
I have a table with 3 fields: category, person and sum.
What I need it's a group on category and after that an descending sort on sum (this way I have the maximum as the first value per each category).
Well you'll probably say that it's a simple select, well not exactly, here is the tricky part: I can't have the same person consecutive per category. If it happens, the next lower sum line should switch with it.
What do you think?
Thanks
Here is my situation:
I have a table with 3 fields: category, person and sum.
What I need it's a group on category and after that an descending sort on sum (this way I have the maximum as the first value per each category).
Well you'll probably say that it's a simple select, well not exactly, here is the tricky part: I can't have the same person consecutive per category. If it happens, the next lower sum line should switch with it.
What do you think?
Thanks