Custom Field for Bomb Pot Tables (not Hands)

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom Field for Bomb Pot Tables (not Hands)

Postby Poker Actuary » Tue Jun 21, 2022 9:52 pm

I'm trying to create a custom flag for bomb pot tables. I'm not trying to flag bomb pot hands, but all hands at a bomb pot table, regardless of whether the hand itself was a bomb pot.

Unfortunately I'm more comfortable in SQL than in PokerTracker4. The query below produces a list of hand id's and bomb pot table flags, setting the flag to true for any hand that is at a table that has a bomb pot hand in my DB that day. (I'm considering a hand a bomb pot if there were no blinds, there were antes, and the number of people dealt into the hand is the same as the number of people who saw the flop.)

My question is how I would incorporate this flag into a report so I can investigate the difference between bomb pot tables and non-bomb pot tables?

Code: Select all
select distinct
   id_hand,
   exists(
      select 1 from (
         select
            id_table,
            date(date_played) date_played_dt
         from cash_hand_player_statistics natural join cash_hand_summary
         where cnt_players = cnt_players_f
         group by id_table, id_hand, date(date_played)
         having min(amt_ante) > 0 and max(amt_blind) = 0
         ) x
         where s.id_table = x.id_table and date(s.date_played) = x.date_played_dt
      ) bomb_pot_table_flag
 from cash_hand_summary s


As I read this, I'll probably modify the query so it considers a hand as being at a bomb pot table if there was a bomb pot hand played at it within an hour. That way I don't miscategorize a few hands played before or after a calendar date change. But that tweak would be simple enough. If I knew tables never changed bomb pot status, then I could do away with the date field entirely, but I digress!
Poker Actuary
 
Posts: 22
Joined: Thu May 22, 2008 2:26 pm

Re: Custom Field for Bomb Pot Tables (not Hands)

Postby Flag_Hippo » Wed Jun 22, 2022 11:56 am

Unfortunately I'm not that familiar with SQL and I don't know of a method to compile a report of this nature in PokerTracker 4. If I learn anything further about this I will reply back here and let you know.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Custom Field for Bomb Pot Tables (not Hands)

Postby Poker Actuary » Wed Jun 22, 2022 1:28 pm

Maybe a simpler way around this is for me to just rewrite the query into a script that changes the table type in the DB itself. For example there are “NL $1 6-max” table types and “NL $1 6-max (FAST)” table types so I could just create a “NL $1 6-max (BOMB)” table type and assign hands/tables to it via script directly to the underlying PostgreSQL tables. I don’t normally like directly modifying tables but I doubt it would corrupt anything and I can backup the DB before I try it. Might this work instead?
Poker Actuary
 
Posts: 22
Joined: Thu May 22, 2008 2:26 pm

Re: Custom Field for Bomb Pot Tables (not Hands)

Postby Poker Actuary » Wed Jun 22, 2022 7:13 pm

I won't leave you in suspense, Flag_Hippo. It is possible to do and not hard, but requires making direct changes in the DB layer. The only annoying part is I have to rebuild the cache afterwards. Here's a screenshot from a sample DB I created. :D
Attachments
pt4_bomb_test.png
Poker Actuary
 
Posts: 22
Joined: Thu May 22, 2008 2:26 pm

Re: Custom Field for Bomb Pot Tables (not Hands)

Postby Flag_Hippo » Thu Jun 23, 2022 5:34 am

That's good to see and thanks for posting the update.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 23 guests

cron