column returns 0

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Re: column returns 0

Postby kraada » Sun Nov 25, 2012 12:30 pm

I just checked the PT3 schema and I don't see the field you are referring to - could it have been called something else? I'm not recalling any such field off the top of my head.

You can specify walks with lookup_actions_p.action = '' (that's two single quotes) - the action string is empty if and only if a player gets a walk.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: column returns 0

Postby erdnase17 » Sun Nov 25, 2012 1:27 pm

kraada wrote:I just checked the PT3 schema and I don't see the field you are referring to - could it have been called something else? I'm not recalling any such field off the top of my head.

You can specify walks with lookup_actions_p.action = '' (that's two single quotes) - the action string is empty if and only if a player gets a walk.


The field is described here https://www.pokertracker.com/guides/PT3 ... umentation under Table tourney_holdem_type.

That expression is the definition of cnt_walks but how do I make such a definition when the smallest stack is X? I can't use effective_stacks because it is 0 in walks.
erdnase17
 
Posts: 227
Joined: Wed Feb 15, 2012 10:07 am

Re: column returns 0

Postby kraada » Sun Nov 25, 2012 3:16 pm

I don't know how that documentation got that way; it is not how the PT3 schema looks at the moment. I don't see any place we store that information in PT4 either but I'll ask and see what I can find out for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: column returns 0

Postby erdnase17 » Mon Nov 26, 2012 8:04 pm

bump! any news on this?

To count the number of hands in the bb including walks, when the smallest stack is between 0 and 8 I tried to use live_table_min_stack but for some reason it is not working.

Code: Select all
sum(if[tourney_hand_player_statistics.id_hand > 0 and lookup_positions.flg_bb AND (live_tourney_table.amt_min_stack / live_tourney_table.amt_bb) BETWEEN 0 and 8, 1, 0])


Even if it worked it would be useless in reports though there are other ways to get the same information.

I think there should be a way to count walks in the BB at a given stack size interval even if the current definition of effective stack won't allow it. This could be solved by explicitly storing the smallest stack for each hand or alternatively storing the starting stacks for the tournament type, from which the smallest stack can be deduced using amt_before. Note that I am interested in HU tables only.
erdnase17
 
Posts: 227
Joined: Wed Feb 15, 2012 10:07 am

Re: column returns 0

Postby BillGatesIII » Tue Nov 27, 2012 3:54 am

I think it should be possible to get the starting stack from the first hand history record of the tournament. I have to think it over and will try to make that stat tonight, have to work now :)

In this thread there is a lengthy discussion about 'smallest stack' including a script I wrote you can use if you really need this stat.
https://www.pokertracker.com/forums/viewtopic.php?f=58&t=43589&start=10
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: column returns 0

Postby BillGatesIII » Tue Nov 27, 2012 2:22 pm

Can't get it done.

This is the SQL that works in pgAdmin:
Code: Select all
select thps.amt_before
from tourney_hand_player_statistics thps
where thps.id_hand =
  (select min(thps_min.id_hand)
   from tourney_hand_player_statistics thps_min
   where thps.id_tourney = thps_min.id_tourney
   and thps.id_player = thps_min.id_player)


But it gives me a validation error when I put this in an new tourney hand colum.

Sorry.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: column returns 0

Postby erdnase17 » Tue Nov 27, 2012 2:51 pm

Thanks for the help.

I am not sure you can place arbitrary SQL in a column but your script should work as a database trigger, however I am not sure if updating that column has any implications with the correct functioning of some PT4 functionality we are not foreseeing.

Let's see if PT4 support comes up with something less drastic. As I said before I think having a way to calculate the tournament starting stacks would allow us to calculate the smallest stack for any subsequent hand using min(amt_before, starting stack-amt_before).
erdnase17
 
Posts: 227
Joined: Wed Feb 15, 2012 10:07 am

Re: column returns 0

Postby erdnase17 » Wed Nov 28, 2012 1:42 pm

Is it possible to translate this SQL expression into a column definition?

Code: Select all
SELECT amt_before from tourney_hand_player_statistics where id_tourney = <current tourney id> ORDER BY date_played limit 1
erdnase17
 
Posts: 227
Joined: Wed Feb 15, 2012 10:07 am

Re: column returns 0

Postby kraada » Wed Nov 28, 2012 3:04 pm

The limit expression won't really work within a column definition.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: column returns 0

Postby erdnase17 » Wed Nov 28, 2012 3:13 pm

kraada wrote:The limit expression won't really work within a column definition.


How can I get the starting stacks then?
erdnase17
 
Posts: 227
Joined: Wed Feb 15, 2012 10:07 am

PreviousNext

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 11 guests

cron