How to build stat W$woSD

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

How to build stat W$woSD

Postby eroock » Wed Jul 06, 2011 11:54 am

Maybe my two favorite mods can help me build this custom stat. It's meant for the positions tab, hence Holdem Cash Player Statistics: Amount $ won w/o showdown
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: How to build stat W$woSD

Postby kraada » Wed Jul 06, 2011 1:18 pm

cnt_won_wo_sd: sum(if[not(holdem_hand_player_statistics.flg_showdown) and holdem_hand_player_statistics.flg_won_hand, 1, 0])

divided by

cnt_hands_wo_sd: sum(if[not(holdem_hand_player_statistics.flg_showdown) and holdem_hand_player_statistics.flg_vpip, 1, 0])

This is a little different than a straight conversion of W$SD because W$SD is how often, given you went to showdown, did you win. Well you fold a lot and don't get to showdown so we don't want those included here. Instead we have how often you win without going to showdown, given that you put some money in the pot -- that is, given that you tried at least a little to win the hand.

Put the former over the latter, multiply by 100 and away you go.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to build stat W$woSD

Postby eroock » Wed Jul 06, 2011 7:01 pm

Two problems here:

a) The percentage for the BB seems off
[ img ]

b) I'd like to have the figure as absolute $ as seen here, also for W$atSD
[ img ]

How would I do that?
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: How to build stat W$woSD

Postby WhiteRider » Thu Jul 07, 2011 3:34 am

In the big blind you quite often don't VPIP, so I think the opportunities column or to be just:

cnt_hands_wo_sd =
sum(if[not(holdem_hand_player_statistics.flg_showdown), 1, 0])

..although if you want to only count hands where you put some money in you could include a check for "holdem_hand_player_detail.amt_bet_ttl > 0" (but you'd to do that in both columns, not just one).


To get a pure $ amount won without showdown you could use a single column like this:

amt_won_wo_sd =
sum(if[not(holdem_hand_player_statistics.flg_showdown) and holdem_hand_player_statistics.flg_won_hand, holdem_hand_player_statistics.amt_won, 0])
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to build stat W$woSD

Postby eroock » Thu Jul 07, 2011 4:50 pm

We're almost there. This is how it looks for me now

[ img ]

W$atSD: sum(if[(holdem_hand_player_statistics.flg_showdown) and holdem_hand_player_statistics.flg_won_hand, holdem_hand_player_statistics.amt_won, 0])

W$woSD: sum(if[not(holdem_hand_player_statistics.flg_showdown) and holdem_hand_player_statistics.flg_won_hand, holdem_hand_player_statistics.amt_won, 0])

However, those columns don't really add up to the full amount won and there should be some minus values for woSD, since my red line is negative. Are we missing something?
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: How to build stat W$woSD

Postby WhiteRider » Thu Jul 07, 2011 4:56 pm

We're only counting hands you won, so your losses are ignored. (I think I may have misinterpreted your intentions.)
If you want your amount won (including losses) with or without showdown you need to take out the "holdem_hand_player_statistics.flg_won_hand" part of your expressions.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to build stat W$woSD

Postby eroock » Thu Jul 07, 2011 5:50 pm

That's it. Thanks for the support [still missing thumb-up smiley]
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: How to build stat W$woSD

Postby WhiteRider » Fri Jul 08, 2011 3:22 am

You're welcome.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to build stat W$woSD

Postby eroock » Fri Jul 08, 2011 7:50 am

Similarly, if I wanted to see my winings as columns of IP and OOP, how would that look like?
eroock
 
Posts: 147
Joined: Sun Jun 20, 2010 8:50 pm

Re: How to build stat W$woSD

Postby WhiteRider » Fri Jul 08, 2011 9:25 am

How are you defining in and out of position in this case?
Do you mean on the flop?
That would be using "holdem_hand_player_detail.flg_f_has_position".
To do out of position you can use NOT holdem_hand_player_detail.flg_f_has_position, but then you'll probably want to check for seeing the flop too, using "holdem_hand_player_statistics.flg_f_saw" (because you are not in position on the flop if you didn't see the flop).
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 1 guest