Top hands played further help needed

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

Top hands played further help needed

Postby Th0rgal » Wed Nov 26, 2008 1:26 pm

Hi,

I have now managed to create a colum and can now count how many typical hands people have played.
eg I now have a counter in the HUD that counts how many times a person shows AA

Created this colum:
cnt_AA sum( if[ tourney_holdem_hand_player_statistics.id_holecard=1, 1, 0] )

I am now trying to figure how to count how much is bet when opening (Raise, Call, Re-raise) with this hand
I created a colum for the pre flop bet amounth
amt_bet_p sum(tourney_holdem_hand_player_detail.amt_bet_p)

and try create a stat AA bet amount:
if(cnt_AA >= 1, amt_bet_p, 'NA')

Unfortunately when AA gets shown it shows the total amount bet up till that hand and not for that hand.

Any advice on where I go wrong?


This is what I eventually want to get to:

Hand / Position played / Average Amount Bet / Action
AA / UTG / 1 BB (limp) / Open
AA / Button / 3.5 BB / Raise
AKs / Middle / 5BB / Re-raise
Th0rgal
 
Posts: 90
Joined: Sat Apr 19, 2008 7:45 am

Re: Top hands played further help needed

Postby WhiteRider » Wed Nov 26, 2008 3:09 pm

You need to check for AA and then sum the raise amount in your Column.

amt_bet_p_AA sum( if[ tourney_holdem_hand_player_statistics.id_holecard=1, tourney_holdem_hand_player_detail.amt_bet_p, 0] )
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Top hands played further help needed

Postby preparac » Sun Mar 15, 2009 5:12 pm

Waht exactly measures amt_bet_p ? Only the first preflop bet of a player (if so: only first in raises? Or also calls, raises after limpers, 3bets after a raiser...?) or the al bets a player made preflop?

What I want to have ist a stat, that only takes into account the amount of the first raise of a player (RFI) and express it in bigblinds. For example ...

amt_bet_p_aakk
sum( if[(tourney_holdem_hand_player_statistics.id_holecard = 1 OR tourney_holdem_hand_player_statistics.id_holecard = 26), tourney_holdem_hand_player_detail.amt_bet_p, 0])

and
cnt_hands_aakk
sum(if[tourney_holdem_hand_player_statistics.id_holecard = 1 OR tourney_holdem_hand_player_statistics.id_holecard = 26, 1, 0])

... will this do the work and show me how much (in average) a player raises with AA or KK if he raises ? And how I break this number down in bigblinds? Considering that the blinds are different in each hand and I cannot just take the average of the blinds, but I must break down the numer in each hand ... any help apreciated!
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am

Re: Top hands played further help needed

Postby WhiteRider » Sun Mar 15, 2009 7:04 pm

You're along the right lines.

amt_bet_p is the total amount bet by the player preflop (you can't actually "bet" preflop).

The amount you raise as your first preflop raise is stored in:
tourney_holdem_hand_player_detail.amt_p_raise_made

There is also:
tourney_holdem_hand_player_detail.amt_p_raise_made_2
..which is the last raise you make preflop.

You can get the big blind amount from:
tourney_holdem_blinds.amt_bb

To get the total of the amounts raised as RFI, you'll need to do something like this: (forgive me if this isn't spot on, it's late here and I'm ready for bed..)
amt_bet_p_aakk
sum( if[(tourney_holdem_hand_player_statistics.id_holecard = 1 OR tourney_holdem_hand_player_statistics.id_holecard = 26) AND tourney_holdem_hand_player_statistics.flg_p_first_raise, tourney_holdem_hand_player_detail.amt_p_raise_made / tourney_holdem_blinds.amt_bb, 0])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Top hands played further help needed

Postby preparac » Mon Mar 16, 2009 8:42 am

Thanks for the hints - now I will be able to build that stat!
preparac
 
Posts: 323
Joined: Thu May 15, 2008 6:23 am


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

Who is online

Users browsing this forum: No registered users and 4 guests