total invested in previous street

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

total invested in previous street

Postby lavezzi » Sat Feb 08, 2014 9:57 pm

Any one could help be know how much Ive invested in previous street ?
Basically I want to filter hands by hand strength (two over cards, draw) and have 3 columns showing how much I've invested on Preflop/Flop/Turn.
The total for each street should be the real money put in the pot on each street (calling/betting/raising or 0 if the hand was checked.

Any kind of help is appreciated.

thanks
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby kraada » Sun Feb 09, 2014 11:07 am

Is this for PT3 or PT4?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: total invested in previous street

Postby lavezzi » Sat Feb 15, 2014 9:22 am

kraada wrote:Is this for PT3 or PT4?


PT3

for preflop I've added a column with the following expression but i want average so I need to divide it for number of hands.
Code: Select all
SUM(holdem_hand_player_detail.amt_bet_p)


which is the hand count symbol?
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby WhiteRider » Sat Feb 15, 2014 12:37 pm

You will need to do that in the stat - simply divide your new column by cnt_hands.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: total invested in previous street

Postby lavezzi » Sun Feb 16, 2014 12:13 am

WhiteRider wrote:You will need to do that in the stat - simply divide your new column by cnt_hands.


Thanks.

I've noticed that amt_bet_X include also uncovered bets amount.
Example on flop I bet 1$, my opponents raise to 3, I go allin for 50$, my opponent call 3$ and is allin.
my amt_bet_f is 51$ while in reality it was covered only for 3+3=6$.

Is there a way to know exactly how much of my money whet into the pot?
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby lavezzi » Sun Feb 16, 2014 12:36 am

This query gives me correct value
Code: Select all
SELECT d.amt_bet_p, d.amt_bet_f, d.amt_bet_t, d.amt_bet_r FROM  holdem_hand_histories as h, holdem_hand_player_statistics as s, holdem_hand_player_detail as d
WHERE s.id_hand=h.id_hand AND d.id_hand=h.id_hand AND  h.history like '%3474678225%' LIMIT 1;


removing the LIMIT 1 I get some row with correct value and some with wrong value (really invested and covered and invested but not full covered.

Any tip on it?

ty
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby lavezzi » Sun Feb 16, 2014 1:14 am

oh i did forget to join player table thats why
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby lavezzi » Sun Feb 16, 2014 4:26 am

Thats so strange, i folded on flop but the rows in the attached screenshot looks strange. Row 2 seems to have correct ant_bet_f.
What Im not understanding ?
GAME #3533337399: Texas Hold'em NL €0.01/€0.02
Table Qwilfish
Seat 1: emanuelee1995 (€0.75 in chips)
Seat 3: TheKingsvsAces (€2.96 in chips) DEALER
Seat 5: MaxRebelda (€2.06 in chips)
Seat 8: hero (€2.13 in chips)
Seat 10: smalpeppe (€1.91 in chips)
MaxRebelda: Post SB €0.01
psico66: Post BB €0.02
*** HOLE CARDS ***
Dealt to hero [D5 H5]
smalpeppe: Call €0.02
emanuelee1995: Call €0.02
TheKingsvsAces: Fold
MaxRebelda: Call €0.01
hero: Check
*** FLOP *** [S7 S9 HJ]
MaxRebelda: Bet €0.04
hero: Fold
smalpeppe: Call €0.04
emanuelee1995: Call €0.04
*** TURN *** [C10]
MaxRebelda: Check
smalpeppe: Bet €0.16
emanuelee1995: Call €0.16
MaxRebelda: Fold


SQL

Code: Select all
SELECT s.amt_won, d.amt_bet_p, d.amt_bet_f, d.amt_bet_t, d.amt_bet_r FROM  player as p, holdem_hand_histories as h, holdem_hand_player_statistics as s, holdem_hand_player_detail as d
WHERE s.id_hand=h.id_hand AND d.id_hand=h.id_hand AND  h.history like '%3533337399%' and s.id_player=p.id_player AND p.player_name='hero' ;


RESULT OF QUERY
Image
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby lavezzi » Sun Feb 16, 2014 4:39 am

i feel like talking with a psicanalyst.

Solved, missing
AND s.id_player=d.id_player
lavezzi
 
Posts: 24
Joined: Tue Apr 21, 2009 6:08 pm

Re: total invested in previous street

Postby WhiteRider » Sun Feb 16, 2014 6:26 am

Thanks for letting us know! Self-therapy can be fun! :)
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: MagPie Crawler and 14 guests

cron