List of players, number of sng played

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

List of players, number of sng played

Postby PescePollo » Wed May 12, 2010 5:53 pm

I want to access the database directly, using SQL (and PHP as a scripting language).
I know how to to obtain a list of players: field player_name in table player
I would like to:

1) Get only Ongame players
2) Get, for every player, the count of sng played with any buy-in
3) Get, for every player, the count of sng played with a buy-in of $10+1

Can you please help?
PescePollo
 
Posts: 13
Joined: Sat Feb 14, 2009 12:36 pm

Re: List of players, number of sng played

Postby kraada » Thu May 13, 2010 9:15 am

The queries you want are:

(1) SELECT player_name from player WHERE id_site = 600; (You can see the list of id_site values by running SELECT * from lookup_sites;)

(2) SELECT player_name, count(*) from player, tourney_holdem_summary, tourney_holdem_results where player.id_player = tourney_holdem_results.id_player AND tourney_holdem_results.id_tourney = tourney_holdem_summary.id_tourney and tourney_holdem_summary.id_table_type BETWEEN 100 and 1300 GROUP BY player.player_name; (Note this does all types of SnG - SELECT * from lookup_tourney_table_type; to see the options for tourney table types)

(3) SELECT player_name, count(*) from player, tourney_holdem_summary, tourney_holdem_results where player.id_player = tourney_holdem_results.id_player AND tourney_holdem_results.id_tourney = tourney_holdem_summary.id_tourney and tourney_holdem_summary.id_table_type BETWEEN 100 and 1300 and tourney_holdem_summary.amt_buyin = 11 GROUP BY player.player_name;
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: List of players, number of sng played

Postby PescePollo » Thu May 13, 2010 10:13 am

Wow, I expected some hint, not ready-made queries.
Thanks a lot :-)
These queries work in part: in fact, both tourney_holdem_summary.id_table_type and tourney_holdem_summary.amt_buyin are always 0.
This is probably because I don't manually enter tournament results: can you confirm?
PescePollo
 
Posts: 13
Joined: Sat Feb 14, 2009 12:36 pm

Re: List of players, number of sng played

Postby kraada » Thu May 13, 2010 12:38 pm

That could definitely do it. If there's no data about the buyin or tournament type available in the hand histories, PT3 doesn't know what the buyin or tourney type is. What site is this for?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: List of players, number of sng played

Postby PescePollo » Thu May 13, 2010 6:12 pm

Different skins of Ongame.
PescePollo
 
Posts: 13
Joined: Sat Feb 14, 2009 12:36 pm

Re: List of players, number of sng played

Postby kraada » Thu May 13, 2010 6:19 pm

Yeah as far as I'm aware, OnGame doesn't include any of that information in hand histories, nor does it provide tournament summaries.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: List of players, number of sng played

Postby PescePollo » Fri May 14, 2010 2:09 am

Yes, they do!
Here is a typical header line in he hand history:

***** History for hand T5-12345678-43 (TOURNAMENT: "Metz", S-2134-3353, buy-in: $11) *****

The buy-in is clearly specified.
Also, the 2134 you see means "normal sng for $10+1"
Other codes: 2295 would mean "sng double-up for $3+0.30"

I can provide you a more complete list if you are interested, and it can help you to improve Ongame sng support.
PescePollo
 
Posts: 13
Joined: Sat Feb 14, 2009 12:36 pm

Re: List of players, number of sng played

Postby kraada » Fri May 14, 2010 9:13 am

That would be very much appreciated!

Send us the list in a support ticket and PM me the ticket number and I'll escalate it to the development team so that we can hopefully get some action fairly quickly on this one.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: List of players, number of sng played

Postby WhiteRider » Fri May 14, 2010 9:32 am

I think the buy-in information in hand histories is fairly new - someone else reported this recently and it's in our system to be added. Please do create your ticket, though, having more examples can't hurt and it will mean that you will get a notification when the fix is released.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 8 guests