I was wondering with a table setup like this
Name fish_sales cat_sales dog_sales
Bob 5 10 3
Mary 8 7 6
Ken 10 8 7
Is there a way to get a stack ranking for each column type without getting into temporary tables? The output would hopefully look like :
Name f_sales f_rank c_sales c_rank d_sales d_rank
Bob 5 3 10 1 3 3
Mary 8 2 7 3 6 2
Ken 10 1 8 2 7 1
but would have more names then just those three. If you need any more info please let me know.
Thanks
Name fish_sales cat_sales dog_sales
Bob 5 10 3
Mary 8 7 6
Ken 10 8 7
Is there a way to get a stack ranking for each column type without getting into temporary tables? The output would hopefully look like :
Name f_sales f_rank c_sales c_rank d_sales d_rank
Bob 5 3 10 1 3 3
Mary 8 2 7 3 6 2
Ken 10 1 8 2 7 1
but would have more names then just those three. If you need any more info please let me know.
Thanks
Comment