Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Dave #1
Ranking of results?
I've got various statistics, some are calculated from a query, which I'm
putting into a custom query which I'm running a query of a query on. This
works fine, but the next thing I'd like to do is to take the same data and
determine the ranking of the various statistics compared to the rest of the
data set.
So for using baseball for an example, let's say I have
Stats
Player | At Bats | Hits | Batting Avg
Bob | 400 | 100 | .250
Jack | 200 | 75 | .375
Ted | 300 | 125 | .416
Now I'd like to take this data and determine where players would rank in the
individual categories.
Rank
Player | At Bats | Hits | Batting Avg
Bob | 1 | 2 | 3
Jack | 3 | 3 | 2
Ted | 2 | 1 | 1
Any ideas on the best way to accomplish this? I'm drawing a blank here.
Dave
Dave Guest
-
ranking in mysql query
Hi all, just wondering if its possible to do a ranking with an update query ? all suggestions are appreciated -
ASP/SQL Ranking Query
Tim J wrote: With Access, I can't think of any way to do this that does not involve a custom function called from the query. Unfortunately, you... -
Ranking count values?
What database is this? If it's SQL Server, you should be able to say TOP 10 WITH TIES ... "Willem-Jan Selen" <wselen@hotmail.com> wrote in... -
sorting and ranking
"shallabaz" <shallabaz@yahoo.com> wrote in message news:0c1f01c3454f$3abb6b40$a501280a@phx.gbl... Assuming you have properly normalized tables it... -
Combo box and ranking
X records on a continuous form which I want to number 1 to X. Any ideas about how I can use a combo to do this e.g. if there are five records to... -
The ScareCrow #2
Re: Ranking of results?
This would increase the processing, but off the top of my head.
If you did a QoQ of the QoQ and do an order by the column this would give you
the ranking order for that column, you could then loop through the result set
and insert the ranking into the column.
But you would need to do this for every column you wanted to rank. On the
bright side you could create a custom tag to do this, with this custom tag in a
list loop of the columns to rank and then just pass through the column name.
Ken
The ScareCrow Guest
-
Dave #3
Re: Ranking of results?
Yeah that's the only way I could see of doing it but I was hoping there was
a more obvious/elegant way of doing it that I just wasn't seeing.
Thanks Ken
"The ScareCrow" <info@krcaldwell.com> wrote in message
news:d5u5v8$eeg$1@forums.macromedia.com...> This would increase the processing, but off the top of my head.
>
> If you did a QoQ of the QoQ and do an order by the column this would give
> you
> the ranking order for that column, you could then loop through the result
> set
> and insert the ranking into the column.
>
> But you would need to do this for every column you wanted to rank. On the
> bright side you could create a custom tag to do this, with this custom tag
> in a
> list loop of the columns to rank and then just pass through the column
> name.
>
> Ken
>
Dave Guest



Reply With Quote

