Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > PL/NL Texas Hold'em > Full Ring
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-31-2007, 07:23 PM
tautomer tautomer is offline
Senior Member
 
Join Date: Oct 2006
Posts: 356
Default Flopped set query by date and site (postgreSQL)

I figured all the full ring set miners would get some use out of this. [img]/images/graemlins/wink.gif[/img]

It's a flopped set query (use pgAdmin) that separates everything by date and site and pocket pair. It's kind of a patchwork query as I have no background in this area and had to use ideas/lines from unrelated queries to get this to output correctly. Every set query I've seen posted was for the entire database and just spit out one small table for everything. I wanted more detail so I threw this together. Whatever, it works.

You need a postgreSQL database though, it wont work on the default Access databases in PokerTracker. Open pgAdmin, connect to the postgreSQL server, click on your database, click on the SQL button (looks like a pencil and paper), then paste the below query into the window that pops up and press the run button.

At the bottom where it says "AND g.site_id = 2", the 2 stands for Poker Stars. Full Tilt is 11, Ultimate Bet is 4, and Party Poker is 3 so you'd need to change the numbers depending on the site of interest. Those are the only sites I've played so I can't tell you the site numbers of any others. But, I believe you can just delete that line altogether and the output will be for all sites and you can separate them as you see fit. Copy the data into Excel and create a pivot table, works like a charm. I'd be interested in seeing other people's results if you're willing to share. And if anyone with the know-how could have this query spit out the total $ winnings for sets and total $ losses when they get cracked/oversetted, that would be awesome. Here it is:

SELECT
site_id AS site,
to_char(date_played, 'MM/DD/YYYY') AS Date,
gp.hole_cards AS Pair,
count(*) AS Times,
SUM(
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END ) as Flopped_Set , SUM((
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_With_Set, SUM((1-
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_Without_Set

FROM game_players AS gp INNER JOIN game AS g ON gp.game_id = g.game_id

WHERE
gp.player_id = (select pref_value from prefs where pref_key = 'RP')
AND gp.pair_hand = 1
AND gp.saw_flop_n = 1
AND g.site_id = 2
GROUP BY g.date_played, g.site_id, gp.hole_cards, gp.card_order1

ORDER BY g.date_played DESC
Reply With Quote
  #2  
Old 04-01-2007, 12:09 AM
kidpokeher kidpokeher is offline
Senior Member
 
Join Date: Apr 2006
Location: value shoving
Posts: 2,115
Default Re: Flopped set query by date and site (postgreSQL)

This is cool, thanks! Is there a way of adding something similar to a REM statement to the query to help me remember to change the different site ID's? Wildzer0 seems to be the resident expert on SQL. Maybe he'd be able to help get totals on this query and do the other stuff you mentioned.
Reply With Quote
  #3  
Old 04-01-2007, 01:32 AM
tautomer tautomer is offline
Senior Member
 
Join Date: Oct 2006
Posts: 356
Default Re: Flopped set query by date and site (postgreSQL)

I'm not sure how to do that. I have a separate Excel file for each site and usually update it when I'm done with a session before I forget. And it gives me an excuse to review my hands, which is always a good thing.

Anyway, you should flop a set or better 11.76% of the time you see a flop and get dealt a pocket pair 5.88% of the time.

My results:
Full Tilt (24000 hands) pocket pair: 5.89% set: 11.84% won with set: 92%
Ultimate Bet (42000 hands) pocket pair: 5.68% set: 11.31% won with set: 89.8%
Poker Stars (96000 hands) pocket pair: 5.84% set: 11.19% won with set: 91%

The numbers are close to expected so I guess the sites aren't rigged after all!
Reply With Quote
  #4  
Old 04-01-2007, 10:15 AM
skylos skylos is offline
Senior Member
 
Join Date: Oct 2006
Posts: 184
Default Re: Flopped set query by date and site (postgreSQL)

Cool stuff thanks. I only have 63k hands but my numbers are pocket pair: 5.95% set: 10.54% and won with set: 90.44%.

So I'm missing about 18 or so flopped sets but the other numbers look pretty close. To bad I can't ever win a pot with a >75% edge when the money goes in either. Would there be an easy way to do a search for something like win % based on equity when the pot is like bigger than a certain amount or something?
Reply With Quote
  #5  
Old 04-01-2007, 10:33 AM
myheadhurts myheadhurts is offline
Senior Member
 
Join Date: Jan 2007
Location: AIM: same as stars SN (pm me)
Posts: 328
Default Re: Flopped set query by date and site (postgreSQL)

[ QUOTE ]
I figured all the full ring set miners would get some use out of this. [img]/images/graemlins/wink.gif[/img]

It's a flopped set query (use pgAdmin) that separates everything by date and site and pocket pair. It's kind of a patchwork query as I have no background in this area and had to use ideas/lines from unrelated queries to get this to output correctly. Every set query I've seen posted was for the entire database and just spit out one small table for everything. I wanted more detail so I threw this together. Whatever, it works.

You need a postgreSQL database though, it wont work on the default Access databases in PokerTracker. Open pgAdmin, connect to the postgreSQL server, click on your database, click on the SQL button (looks like a pencil and paper), then paste the below query into the window that pops up and press the run button.

At the bottom where it says "AND g.site_id = 2", the 2 stands for Poker Stars. Full Tilt is 11, Ultimate Bet is 4, and Party Poker is 3 so you'd need to change the numbers depending on the site of interest. Those are the only sites I've played so I can't tell you the site numbers of any others. But, I believe you can just delete that line altogether and the output will be for all sites and you can separate them as you see fit. Copy the data into Excel and create a pivot table, works like a charm. I'd be interested in seeing other people's results if you're willing to share. And if anyone with the know-how could have this query spit out the total $ winnings for sets and total $ losses when they get cracked/oversetted, that would be awesome. Here it is:

SELECT
site_id AS site,
to_char(date_played, 'MM/DD/YYYY') AS Date,
gp.hole_cards AS Pair,
count(*) AS Times,
SUM(
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END ) as Flopped_Set , SUM((
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_With_Set, SUM((1-
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_Without_Set

FROM game_players AS gp INNER JOIN game AS g ON gp.game_id = g.game_id

WHERE
gp.player_id = (select pref_value from prefs where pref_key = 'RP')
AND gp.pair_hand = 1
AND gp.saw_flop_n = 1
AND g.site_id = 2
GROUP BY g.date_played, g.site_id, gp.hole_cards, gp.card_order1

ORDER BY g.date_played DESC

[/ QUOTE ]

Absolutely bloody brilliant, thanks.

I put it through my 2007 stats, and noted that I had never had a flopped set of Jacks cracked (every other set had been cracked 5+ times). I thought to myself "now I know that JJJ will never hold up".

THe very next day:

PokerStars No-Limit Hold'em, $1.00 BB (8 handed) Hand History Converter Tool from FlopTurnRiver.com (Format: 2+2 Forums)

Hero ($99.30)
UTG ($98.05)
UTG+1 ($39.65)
MP1 ($80.75)
MP2 ($39)
CO ($107.50)
Button ($92.20)
SB ($146.70)

Preflop: Hero is BB with J[img]/images/graemlins/heart.gif[/img], J[img]/images/graemlins/club.gif[/img].
UTG calls $1, <font color="#666666">3 folds</font>, <font color="#CC3333">CO raises to $3</font>, <font color="#666666">2 folds</font>, Hero calls $2, UTG calls $2.

Flop: ($9.50) Q[img]/images/graemlins/heart.gif[/img], J[img]/images/graemlins/spade.gif[/img], 9[img]/images/graemlins/heart.gif[/img] <font color="#0000FF">(3 players)</font>
<font color="#CC3333">Hero bets $7.5</font>, <font color="#CC3333">UTG raises to $15</font>, CO calls $15, Hero calls $7.50.

Turn: ($54.50) 5[img]/images/graemlins/diamond.gif[/img] <font color="#0000FF">(3 players)</font>
Hero checks, <font color="#CC3333">UTG bets $21</font>, CO calls $21, <font color="#CC3333">Hero raises to $81.3</font>, UTG calls $59.05 (All-In), CO calls $60.30.

River: ($297.15) K[img]/images/graemlins/club.gif[/img] <font color="#0000FF">(3 players, 1 all-in)</font>

Final Pot: $297.15

Results in white below:
Hero has Jh Jc (three of a kind, jacks).
UTG has Ks Td (straight, king high).
CO has Qd Qc (three of a kind, queens).
Outcome: UTG wins $294.65. CO wins $2.49.

I mean, if you're going to lose you may as well be totally crushed. Twice. Right?
Reply With Quote
  #6  
Old 04-01-2007, 11:27 AM
skylos skylos is offline
Senior Member
 
Join Date: Oct 2006
Posts: 184
Default Re: Flopped set query by date and site (postgreSQL)

Yeah that sucks. I can't win with JJJ either. Those 9/10 where I win are all limped pots and I pick up $1.50 or the board is 4 straight or 4 flush and mabye I'll get lucky and win $2.00 but the 1/10 where I lose are al a buyin or more. Yaah poker.

PokerStars No-Limit Hold'em, $0.25 BB (9 handed) Hand History Converter Tool from FlopTurnRiver.com (Format: 2+2 Forums)

MP1 ($19.35)
MP2 ($4.80)
MP3 ($23.85)
Hero ($27.20)
Button ($20.30)
SB ($6.70)
BB ($39.95)
UTG ($21.05)
UTG+1 ($6.65)

Preflop: Hero is CO with J[img]/images/graemlins/club.gif[/img], J[img]/images/graemlins/diamond.gif[/img].
<font color="#666666">2 folds</font>, MP1 calls $0.25, <font color="#666666">2 folds</font>, Hero calls $0.25, Button calls $0.25, SB completes, <font color="#CC3333">BB raises to $1.5</font>, MP1 calls $1.25, Hero calls $1.25, Button folds, SB folds.

Flop: ($5) 5[img]/images/graemlins/diamond.gif[/img], 6[img]/images/graemlins/club.gif[/img], J[img]/images/graemlins/spade.gif[/img] <font color="#0000FF">(3 players)</font>
<font color="#CC3333">BB bets $3.5</font>, MP1 folds, <font color="#CC3333">Hero raises to $8.5</font>, <font color="#CC3333">BB raises to $38.45</font>, Hero calls $17.20 (All-In).

Turn: ($69.15) T[img]/images/graemlins/diamond.gif[/img] <font color="#0000FF">(2 players, 1 all-in)</font>

River: ($69.15) Q[img]/images/graemlins/spade.gif[/img] <font color="#0000FF">(2 players, 1 all-in)</font>

Final Pot: $69.15

Results in white below:
BB has Qh Qc (three of a kind, queens).
Hero has Jc Jd (three of a kind, jacks).
Outcome: BB wins $69.15.
Reply With Quote
  #7  
Old 04-01-2007, 11:41 AM
futuredoc85 futuredoc85 is offline
Senior Member
 
Join Date: Aug 2006
Location: ATL
Posts: 9,014
Default Re: Flopped set query by date and site (postgreSQL)

any advice on how to flop one of these "sets"?
Reply With Quote
  #8  
Old 04-01-2007, 12:19 PM
Albert Moulton Albert Moulton is offline
Senior Member
 
Join Date: Jan 2005
Location: Live Full Ring NLHE
Posts: 2,377
Default Re: Flopped set query by date and site (postgreSQL)

Next you can check AA over KK preflop by site.

That's the one that the conspiracy thorists claim occurs too often at online sites.
Reply With Quote
  #9  
Old 04-02-2007, 11:00 AM
kidpokeher kidpokeher is offline
Senior Member
 
Join Date: Apr 2006
Location: value shoving
Posts: 2,115
Default Re: Flopped set query by date and site (postgreSQL)

[ QUOTE ]
any advice on how to flop one of these "sets"?

[/ QUOTE ]

Raise big with your small pocket pairs to ensure villain will flop a bigger set.
Reply With Quote
  #10  
Old 04-02-2007, 11:33 AM
wildzer0 wildzer0 is offline
Senior Member
 
Join Date: May 2005
Location: Balmer, hon
Posts: 2,211
Default Re: Flopped set query by date and site (postgreSQL)

Hey,
Kidepokher pointed me towards this thread. I think this is the query you were looking for? Also, for people who like SQL stuff, I'm going to post a really cool baluga theorum application sql thing in a little while in SSNL, so look for that.

SELECT
gp.hole_cards AS Pair,
SUM(
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END ) as Flopped_Set , SUM((
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_With_Set, SUM((1-
CASE WHEN rtrim(g.flop_1,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_2,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE
CASE WHEN rtrim(g.flop_3,'hdcs')=rtrim(gp.hole_card_1,'hdcs' ) THEN 1 ELSE 0 END END END )*Won_Hand) as Won_Without_Set

FROM game_players AS gp INNER JOIN game AS g ON gp.game_id = g.game_id

WHERE
gp.player_id = (select pref_value from prefs where pref_key = 'RP')
AND gp.pair_hand = 1
AND gp.saw_flop_n = 1
AND g.site_id = 2
and g.date_played &gt;= '2007-01-01'
GROUP BY gp.hole_cards
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:33 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.