Hello,
I have some data from a webgame i co-admin which i want to manipulate after each game has finished.
I have a table containing (id, accountid, game, networth). - this holds the final scores of every player from every game.
My predecessor wrote some convoluted Fcgi script to summarize the data into a top 100 players list which now unfortunately no longer works since our server move.
The summary displayes the top 100 players by average networth of their highest scores in up to 5 games.
e,g:
Rank 1, Player : Sudonim, Games:5, Score: 5,432,123
e.g. for each account_id in my table, i need to get the average of their top 5 scores, ( or less if they have not yet played in 5 games), and output their account name ( linked to accounts table on account_id), count of games use in the average, and THEN rank them top 100 by average score.
Is there a way to output this data set in one go - so that i can have script convert it into a html page..
the current page is here - but its out of date by lots of ages(games):
http://www.chaoticage.co.uk/alltimescores.shtmlso to recap -
i want to run through the dataset by accountid, sort by networth, select the top 5 or top x if less than 5 rows) and get their count of games and average networth. and then put them in order by networth descending, and give them a rank, and then display the top 100 ranked records
I suppose that this does not have to be done in one step. it could be a script using temporary tables as long as at the end there is a dataset i can connect to to make the page.
Whats the best way to go about it?
Can the Top 5 command be used in conjunction with broup by account id to get the top 5 ( or less) scores for each account?
Start Free Trial