Stat check plz (custom hero stats inside) :)

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

Stat check plz (custom hero stats inside) :)

Postby Jack90 » Fri Jan 10, 2014 4:06 pm

Hey, I just created 2 new custom stats, but I am not 100% sure, if I did no mistakes. I know, that we need a lot of Samplesizes, but these are for Highstakes 6max SNGs where I play the same players everyday. I wanted to create a fold and limp stat for these situations, to checkif the sum will be 100, but the fold stat wasnt working allright. So probably u can just tell me, if I did a mistake with the stats or if they look fine to you.

The first stat is how often a player does a normal raise from SB vs Hero in BB. So I just did < 0,5x Stacksize, to filter out all in raises and raises which commit them. Btw are the effective Stacks just for the remaining players in a hand or for all players which sit on the table (otherwhise it will reduce our Samplesizes quite much).

(cnt_p_steal_in_SB_vs_Hero_non_AI_12_25 / cnt_p_steal_opp_in_SB_vs_Hero_12_25) * 100



cnt_p_steal_in_SB_vs_Hero_non_AI_12_25
sum(if[tourney_hand_player_statistics.flg_steal_att and exists
(select 1
from tourney_hand_player_statistics hero
where hero.id_hand = tourney_hand_player_statistics.id_hand
and hero.flg_hero
and tourney_hand_player_statistics.amt_p_raise_facing < (tourney_hand_player_statistics.amt_p_effective_stack * 0.5)
and (tourney_hand_player_statistics.amt_p_effective_stack / tourney_blinds.amt_bb)BETWEEN 12 AND 25
and hero.position = 8), 1, 0])


cnt_p_steal_opp_in_SB_vs_Hero_12_25
sum(if[tourney_hand_player_statistics.flg_steal_opp and exists
(select 1
from tourney_hand_player_statistics hero
where hero.id_hand = tourney_hand_player_statistics.id_hand
and hero.flg_hero
and (tourney_hand_player_statistics.amt_p_effective_stack / tourney_blinds.amt_bb)BETWEEN 12 AND 25
and hero.position = 8), 1, 0])



The 2nd Stat is supposed to be how often a player 3bets our CO and BTN steals with a non all in bet.

(cnt_p_3bet_non_AI_vs_hero_CO_BTN / cnt_p_3bet_opp_vs_hero_CO_BTN ) * 100


cnt_p_3bet_non_AI_vs_hero_CO_BTN
sum(if[tourney_hand_player_statistics.flg_p_3bet and exists
(select 1
from tourney_hand_player_statistics hero
where hero.id_hand = tourney_hand_player_statistics.id_hand
and hero.flg_hero
and hero.flg_p_first_raise
and tourney_hand_player_statistics.amt_p_raise_facing < (tourney_hand_player_statistics.amt_p_effective_stack * 0.5)
and hero.position < 1), 1, 0])


cnt_p_3bet_opp_vs_hero_CO_BTN
sum(if[tourney_hand_player_statistics.flg_p_3bet_opp and exists
(select 1
from tourney_hand_player_statistics hero
where hero.id_hand = tourney_hand_player_statistics.id_hand
and hero.flg_hero
and hero.flg_p_first_raise
and hero.position < 1), 1, 0])


I am anyways not sure about the hero position thing, can i use hero.position < 1 for CO+BTN? BTN was 0 and CO was 1, right? In the Preview of the Thread the cnt_p_3bet_non_AI_vs_hero_CO_BTN looks definetly wrong to me. amt_p_raise_facing doesnt work here, because it will say how big our steal raise was and not how big the size of his 3bet was or am I wrong? Just to tired now to think that deep into programming anymore, hope some1 can help me.
Jack90
 
Posts: 15
Joined: Thu Feb 28, 2013 7:37 pm

Re: Stat check plz (custom hero stats inside) :)

Postby kraada » Fri Jan 10, 2014 5:13 pm

Yes you can use <= 1 for CO & BTN, but < 1 would be BTN only (as 1 wouldn't match and 1 is the CO).

Your stats have one mistake -- you want to use "hero" instead of "tourney_hand_player_statistics" from your aliased table when looking at something hero did. For example you want:

sum(if[tourney_hand_player_statistics.flg_steal_att and exists
(select 1
from tourney_hand_player_statistics hero
where hero.id_hand = tourney_hand_player_statistics.id_hand
and hero.flg_hero
and hero.amt_p_raise_facing < (hero.amt_p_effective_stack * 0.5)
and (hero.amt_p_effective_stack / tourney_blinds.amt_bb) BETWEEN 12 AND 25
and hero.position = 8), 1, 0])

And similarly for the other columns. Otherwise it's looking at villain's data.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: MagPie Crawler and 2 guests

cron