3Bet Preflop vs Hero

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: 3Bet Preflop vs Hero

Postby kraada » Tue Dec 09, 2014 5:40 pm

If you're using a stat in sum(if[X, 1, 0]) format, you can copy out the X and use it in a custom Hands report as a Filter Expression and see what hands match. That's probably easiest.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: 3Bet Preflop vs Hero

Postby 4StarGen » Tue Dec 09, 2014 5:54 pm

ty this is a great input, however, are there some issue with subqueries?

I'm testing for the classic 3bet vs Hero stat...

this is what I'm getting when I enter the expression for the numerator (or for the demoninator)
Image
4StarGen
 
Posts: 932
Joined: Sat Mar 08, 2014 6:58 am

Re: 3Bet Preflop vs Hero

Postby WhiteRider » Wed Dec 10, 2014 4:20 am

If you change everything to lower case (all the AND EXISTS, SELECT, etc) then it should work.
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: 3Bet Preflop vs Hero

Postby 4StarGen » Wed Dec 10, 2014 5:55 am

^works ty, however for learning experience, what is the parser doing wrong? I mean, clearly the upper case doesn't change anything in the expression, so PT4's parser is interpreting them wrong...
4StarGen
 
Posts: 932
Joined: Sat Mar 08, 2014 6:58 am

Re: 3Bet Preflop vs Hero

Postby 4StarGen » Wed Dec 10, 2014 7:16 am

I'm having huge problems displaying a simple vs Hero stat in the HUD, I've waited like 5 minutes and the stats weren't displayed.
In the report tab however it works somewhat well
4StarGen
 
Posts: 932
Joined: Sat Mar 08, 2014 6:58 am

Re: 3Bet Preflop vs Hero

Postby kraada » Wed Dec 10, 2014 8:28 am

I'll make sure we look into what's going on with the parser here.

Have you tried leaving the stat a while in the replayer?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: 3Bet Preflop vs Hero

Postby 4StarGen » Wed Dec 10, 2014 11:08 am

^yeah I've waited about 5 minutes...
4StarGen
 
Posts: 932
Joined: Sat Mar 08, 2014 6:58 am

Re: 3Bet Preflop vs Hero

Postby kraada » Wed Dec 10, 2014 2:24 pm

What does the query look like in the log file? If you run it in PGAdmin does it finish?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: 3Bet Preflop vs Hero

Postby 4StarGen » Wed Dec 10, 2014 2:44 pm

Code: Select all
SELECT (player.player_name_search) AS "str_player_name_search",
   (player.id_site) AS "id_site_player",
   (
      sum((
            CASE
               WHEN (cash_hand_player_statistics.id_hand > 0)
                  THEN 1
               ELSE 0
               END
            ))
      ) AS "cnt_hands",
   (
      sum((
            CASE
               WHEN (
                     cash_hand_player_statistics.flg_p_3bet
                     AND EXISTS (
                        SELECT 1
                        FROM cash_hand_player_statistics hero
                        WHERE hero.id_hand = cash_hand_player_statistics.id_hand
                           AND hero.flg_hero
                           AND hero.flg_p_first_raise
                        )
                     )
                  THEN 1
               ELSE 0
               END
            ))
      ) AS "cnt_p_3bet_vs_hero",
   (
      sum((
            CASE
               WHEN (
                     cash_hand_player_statistics.flg_p_3bet_opp
                     AND EXISTS (
                        SELECT 1
                        FROM cash_hand_player_statistics hero
                        WHERE hero.id_hand = cash_hand_player_statistics.id_hand
                           AND hero.flg_hero
                           AND hero.flg_p_first_raise
                        )
                     )
                  THEN 1
               ELSE 0
               END
            ))
      ) AS "cnt_p_3bet_opp_vs_hero"
FROM cash_limit,
   cash_hand_player_statistics,
   player
WHERE (player.id_player = cash_hand_player_statistics.id_player)
   AND (cash_limit.id_limit = cash_hand_player_statistics.id_limit)
   AND (
      (
         (cash_limit.flg_nl = true)
         AND (cash_limit.flg_lo = false)
         )
      AND (
         ((cash_hand_player_statistics.id_gametype = 1))
         AND (
            cash_hand_player_statistics.id_player IN (
               SELECT (
                     CASE
                        WHEN (p.id_player_alias <> 0)
                           THEN p.id_player_alias
                        ELSE p.id_player
                        END
                     )
               FROM player p
               WHERE (
                     (
                        p.id_site = 100
                        AND p.player_name_search = E 'b'
                        )
                     OR (
                        p.id_site = 100
                        AND p.player_name_search = E 'e'
                        )
                     OR (
                        p.id_site = 100
                        AND p.player_name_search = E 'm'
                        )
                     OR (
                        p.id_site = 100
                        AND p.player_name_search = E 't'
                        )
                     OR (
                        p.id_site = 100
                        AND p.player_name_search = E 'j'
                        )
                     )
               )
            )
         )
      )
GROUP BY (player.player_name_search),
   (player.id_site)


and in pgadmin the query is successful, but it takes a lot of time as you can see
Image
4StarGen
 
Posts: 932
Joined: Sat Mar 08, 2014 6:58 am

Re: 3Bet Preflop vs Hero

Postby kraada » Wed Dec 10, 2014 3:02 pm

Then it really should finish in the replayer as well - it looks like it takes about 2.5 minutes for the query to run, so make sure not to change hands or close the popup (if you have the stat in a popup) until that time elapses or the query may get cancelled.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

PreviousNext

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 22 guests

cron
highfalutin