Stats I want to make. Please tell me is it possible or not.

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

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Fri May 25, 2012 5:30 pm

Something's wrong, example: I have a player in my database who have exactly 1 hand with the factors I mentioned above (BB vs only SB, SB limp).
In that hand I was the one who limped from the SB, and he raised me.

The promblem is that both cnt_p_bb_hands_vs_sb_limp and cnt_p_bb_raise_vs_sb_limp do not couting that hand, ang give result 0 / 0 for the player (Chocobo2008). I pasted to the columns exactly what you wrote.

The hand what I'm talking about:


PokerStars Hand #80979716822: Hold'em No Limit ($0.10/$0.25 USD) - 2012/05/25 13:28:51 CET [2012/05/25 7:28:51 ET]
Table 'Tirela' 9-max Seat #3 is the button
Seat 1: NoFaNoJo ($53.61 in chips)
Seat 2: LA VIDA EL.. ($9.65 in chips)
Seat 3: Undertake ($26.76 in chips)
Seat 4: sasi89 ($10 in chips)
Seat 5: Chocobo2008 ($28.88 in chips)
Seat 6: SunnyB€ach ($31.31 in chips)
Seat 7: pepegois ($10.71 in chips)
Seat 8: FiliusSatani ($66.10 in chips)
Seat 9: KillingAce ($25 in chips)
sasi89: posts small blind $0.10
Chocobo2008: posts big blind $0.25
*** HOLE CARDS ***
Dealt to sasi89 [Td Kc]
SunnyB€ach: folds
pepegois: folds
FiliusSatani: folds
KillingAce: folds
NoFaNoJo: folds
LA VIDA EL..: folds
Undertake: folds
sasi89: calls $0.15
Chocobo2008: raises $0.75 to $1
sasi89: calls $0.75
*** FLOP *** [8d 6c Tc]
sasi89: checks
Chocobo2008: checks
*** TURN *** [8d 6c Tc] [Kh]
sasi89: checks
Chocobo2008: bets $1.50
sasi89: raises $7.50 to $9 and is all-in
Chocobo2008: calls $7.50
*** RIVER *** [8d 6c Tc Kh] [Ks]
*** SHOW DOWN ***
sasi89: shows [Td Kc] (a full house, Kings full of Tens)
Chocobo2008: mucks hand
sasi89 collected $19.10 from pot
*** SUMMARY ***
Total pot $20 | Rake $0.90
Board [8d 6c Tc Kh Ks]
Seat 1: NoFaNoJo folded before Flop (didn't bet)
Seat 2: LA VIDA EL.. folded before Flop (didn't bet)
Seat 3: Undertake (button) folded before Flop (didn't bet)
Seat 4: sasi89 (small blind) showed [Td Kc] and won ($19.10) with a full house, Kings full of Tens
Seat 5: Chocobo2008 (big blind) mucked [Kd Ad]
Seat 6: SunnyB€ach folded before Flop (didn't bet)
Seat 7: pepegois folded before Flop (didn't bet)
Seat 8: FiliusSatani folded before Flop (didn't bet)
Seat 9: KillingAce folded before Flop (didn't bet)
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Fri May 25, 2012 6:06 pm

Maybe it needs a complete cache update, I'm trying to do that now.

Update: I did a test database with 1-2 days HHs, the stat still not working with the mentioned hand.
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby WhiteRider » Sat May 26, 2012 4:28 am

Kraada's expression does not take into account the size of the BB - I have attached the stat you need as the expressions need a little extra tweaking as well and I already have this stat built.

BB raises after SB limps .zip
(793 Bytes) Downloaded 299 times
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Sat May 26, 2012 4:31 am

Thanks, I'll try it immediately. I'll keep you posted.
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Sat May 26, 2012 5:19 am

It works perfectly, thanks a lot for the help, I appreciate it very much. I'll try to study the SQL formula how is it works, so next time it might be I dont need to bothering you guys. Thanks again.
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby WhiteRider » Sat May 26, 2012 7:31 am

That's good to hear - thanks for letting me know! :)
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Sun May 27, 2012 9:58 pm

WhiteRider wrote:Kraada's expression does not take into account the size of the BB - I have attached the stat you need as the expressions need a little extra tweaking as well and I already have this stat built.

BB raises after SB limps .zip


This is not working correctly in PT4, in PT3 it works just fine.

Any ideas?

I'll try to build this stat for PT4 until I receive the answer, maybe I'll succeed to make it.
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby WhiteRider » Mon May 28, 2012 3:17 am

The database fields are slightly different in PT4, although the same mechanism should work.

However, you don't need to do that in PT4 as we have a new mechanism which lets us do this more accurately.

We can tell if the small blind (position 9) was the first to enter the pot using:

cash_hand_summary.str_actors_p LIKE '9%'

..and if we also check for not facing a steal then we know that the SB must have open-limped:

NOT cash_hand_player_statistics.flg_blind_def_opp

That will replace all of the raise size stuff that is needed in PT3.

cnt_p_bb_hands_vs_sb_limp =
sum( if[ cash_hand_player_statistics.position = 8 AND cash_hand_summary.str_actors_p LIKE '9%' AND NOT cash_hand_player_statistics.flg_blind_def_opp, 1, 0 ])

cnt_p_bb_raise_vs_sb_limp =
sum( if[ cash_hand_player_statistics.position = 8 AND cash_hand_summary.str_actors_p LIKE '9%' AND NOT cash_hand_player_statistics.flg_blind_def_opp AND lookup_actions_p.action LIKE 'R%', 1, 0 ])

-----
For more information on the "actors" string have a look at this post.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Stats I want to make. Please tell me is it possible or n

Postby sasieightynine » Mon May 28, 2012 3:29 am

Thanks for replying, I'll check it right now, I'll keep you posted.

UPDATE: It seems it works fine. Thanks for the help.

I tried to do this by myself but I saw that the PT4 database schema just not public yet.
sasieightynine
 
Posts: 141
Joined: Thu Apr 19, 2012 6:02 am

Re: Stats I want to make. Please tell me is it possible or n

Postby kraada » Mon May 28, 2012 7:11 am

The schema in 4 is pretty similar to the schema in 3 - the major changes were that "holdem" and "omaha" were merged so there are only cash and tourney tables (you see how some of them are defined above - replace cash with tourney if need be). The player_detail table was removed (holdem_hand_player_detail) and all values were merged into cash_hand_player_statistics.

I don't think any fields from 3 were removed, but a few have been added - but still that should be enough to get you the majority of the changes.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 0 guests