Stack Size for non-hero player

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Stack Size for non-hero player

Postby josephlabarbara121 » Mon Dec 19, 2022 7:42 pm

Hi, I am aware that it is not straightforward to grab all stack sizes of all players in a hand and that this requires a subquery.

In my attempts to try and figure out this age-old problem once and for all, I've tried a few things:

1. I created columns of the form:

Code: Select all
select tourney_hand_player_statistics.amt_before/tourney_blinds.amt_bb
where tourney_hand_player_statistics.position = '0'


Where I just replaced '0' with the appropriate position number. This does return the stack sizes but only when the player who's occupying the specified position is the player associated with the row in the report I am trying to build. Not sure how to add images on here but for example: https://imgur.com/6XBjp7u

You can see in the screenshot that the field associated with whatever position the player is in is populated; all the other fields are blank. So clearly this first approach isn't working but maybe we're on the right track.



2. I reasoned that really all we need is a dataset with the following information

-Player ID (tourney_hand_player_statistics.id_player)
-Hand ID (tourney_hand_player_statistics.id_hand)
-Position
-Amt_before

and then we can reference that dataset in the subqueries so that we can grab the stack sizes as needed.

My attempt at creating that dataset keeps failing and PT4 is returning the error message that more than one row is returned by a subquery used as an expression:

Code: Select all
select amt_before
from tourney_hand_player_statistics as thps

left join player on thps.id_player = player.id_player

left join tourney_hand_summary on thps.id_hand = tourney_hand_summary.id_hand

where tourney_hand_player_statistics.position = '0'



So I'm basically at a loss at this point, and any help you can give that might get me in the right directions is much appreciated.

Has anyone ever posted custom stats that does this? This has to be one of the most-asked questions.

It's actually extremely important to be able to get all stack sizes as needed--the distribution of stack sizes can significantly impact strategy at all points in the hand--and I don't understand why there aren't build in fields to get this. Clearly the information is there so why is it so difficult to get at it?
josephlabarbara121
 
Posts: 15
Joined: Sat Nov 22, 2014 10:46 pm

Re: Stack Size for non-hero player

Postby Flag_Hippo » Tue Dec 20, 2022 5:29 am

I've not seen anyone post a statistic that does this. I don't know of any method to achieve that but if it's possible that's beyond my SQL knowledge although if a PostgreSQL expert sees this then they might be able to offer some guidance.
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 26 guests

cron
highfalutin