Trying to get started with learning SQL and want to test out a few things. Let's say I want to run a query to select the top n players based on # hands I have on them and then retrieve some stats about them. I tried the following:
[code2eo]
SELECT
p.player_name,
COUNT(hhps.id_player) AS N_HANDS,
SUM (hhps.amt_won) AS WINNINGS
FROM player p, holdem_hand_player_statistics hhps
GROUP BY p.player_name
ORDER BY COUNT(hhps.id_player) DESC
LIMIT 100;
[/code2eo]
So I want to get the top N (in this case 100) players based on # of hands I have on them, their name and total winnings. Obviously I can add to the stats I retrieve later, I'd just like to get the basics working right now.
Trouble is I get an out of disk space error when I try to run the query...only have about ~2gb free and can't really spare any space right now so is there something I can do to get this working? Am I even on the right track?
Also is there a way to do this through the Reports tab in PT3 itself? It seems like there ought to be but I don't know enough about this stuff yet. Thanks in advance!
-dirtyJ
