board-texture in SQL?

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

board-texture in SQL?

Postby Olaf72 » Sat Mar 14, 2009 5:40 pm

how do i get the Texture of the Board in an SQL-statement?

I need "Rainbow-flop"
In filter this is no problem, but i can't find it in the Cnfigure Stats.
Olaf72
 
Posts: 50
Joined: Fri Jan 30, 2009 10:29 am

Re: board-texture in SQL?

Postby kraada » Sun Mar 15, 2009 9:22 am

That's because it's quite complicated and not tied to any specific stat, but to the actual board cards themselves.

The code for rainbow flop is:

not((holdem_hand_summary.card_1 <= 13 and holdem_hand_summary.card_2 <= 13 and holdem_hand_summary.card_3 >13) or (holdem_hand_summary.card_1 <= 13 and holdem_hand_summary.card_2 > 13 and holdem_hand_summary.card_3 <= 13) or (holdem_hand_summary.card_1 > 13 and holdem_hand_summary.card_2 <= 13 and holdem_hand_summary.card_3 <= 13) or ((holdem_hand_summary.card_1 <= 26 and holdem_hand_summary.card_1 >= 14) and (holdem_hand_summary.card_2 <= 26 and holdem_hand_summary.card_2 >= 14) and (holdem_hand_summary.card_3 > 26 or holdem_hand_summary.card_3 < 14)) or ((holdem_hand_summary.card_1 <= 26 and holdem_hand_summary.card_1 >= 14) and (holdem_hand_summary.card_2 > 26 or holdem_hand_summary.card_2 < 14) and (holdem_hand_summary.card_3 <= 26 and holdem_hand_summary.card_3 >= 14)) or ((holdem_hand_summary.card_1 > 26 or holdem_hand_summary.card_1 < 14) and (holdem_hand_summary.card_2 <= 26 and holdem_hand_summary.card_2 >= 14) and (holdem_hand_summary.card_3 <= 26 and holdem_hand_summary.card_3 >= 14)) or ((holdem_hand_summary.card_1 <= 39 and holdem_hand_summary.card_1 >= 27) and (holdem_hand_summary.card_2 <= 39 and holdem_hand_summary.card_2 >= 27) and (holdem_hand_summary.card_3 > 39 or holdem_hand_summary.card_3 < 27)) or ((holdem_hand_summary.card_1 <= 39 and holdem_hand_summary.card_1 >= 27) and (holdem_hand_summary.card_2 > 39 or holdem_hand_summary.card_2 < 27) and (holdem_hand_summary.card_3 <= 39 and holdem_hand_summary.card_3 >= 27)) or ((holdem_hand_summary.card_1 > 39 or holdem_hand_summary.card_1 < 27) and (holdem_hand_summary.card_2 <= 39 and holdem_hand_summary.card_2 >= 27) and (holdem_hand_summary.card_3 <= 39 and holdem_hand_summary.card_3 >= 27)) or (holdem_hand_summary.card_1 >= 40 and holdem_hand_summary.card_2 >= 40 and holdem_hand_summary.card_3 < 40) or (holdem_hand_summary.card_1 >= 40 and holdem_hand_summary.card_2 < 40 and holdem_hand_summary.card_3 >= 40) or (holdem_hand_summary.card_1 < 40 and holdem_hand_summary.card_2 >= 40 and holdem_hand_summary.card_3 >= 40)) and
not((holdem_hand_summary.card_1 <= 13 and holdem_hand_summary.card_2 <= 13 and holdem_hand_summary.card_3 <= 13) or ((holdem_hand_summary.card_1 <= 26 and holdem_hand_summary.card_1 >= 14) and (holdem_hand_summary.card_2 <= 26 and holdem_hand_summary.card_2 >= 14) and(holdem_hand_summary.card_2 <= 26 and holdem_hand_summary.card_2 >= 14) and (holdem_hand_summary.card_3 <= 26 and holdem_hand_summary.card_3 >= 14)) or
((holdem_hand_summary.card_1 <= 39 and holdem_hand_summary.card_1 >= 27) and (holdem_hand_summary.card_2 <= 39 and holdem_hand_summary.card_2 >= 27) and(holdem_hand_summary.card_2 <= 39 and holdem_hand_summary.card_2 >= 27) and (holdem_hand_summary.card_3 <= 39 and holdem_hand_summary.card_3 >= 27) or
(holdem_hand_summary.card_1 >= 40 and holdem_hand_summary.card_2 >= 40 and holdem_hand_summary.card_3 >= 40))) and holdem_hand_player_statistics.flg_f_saw
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: board-texture in SQL?

Postby Olaf72 » Sun Mar 15, 2009 3:04 pm

wow,
thanks a lot.
Olaf72
 
Posts: 50
Joined: Fri Jan 30, 2009 10:29 am

Re: board-texture in SQL?

Postby kraada » Mon Mar 16, 2009 10:19 am

You're welcome (and if you find a cleaner way of doing it, please do let me know :)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: board-texture in SQL?

Postby Darvini » Tue Jun 29, 2010 8:31 am

Just starting on these and were wondering are the any other made codes for board textures. Especially ones that tell whether there is a flush or straight possibility.

And a related question. The id_x_hand_strength http://www.pokertracker.com/forums/view ... d_strength within fullhouse doesnt include double paired boards (which is odd because those situations are more relevant then trips boards). Is there a simple way to check for higher fullhouse on a double paired board (ex. board 22848 and holecards 89)? Complicated would be building a code that checks for individual board cards. :/
Darvini
 
Posts: 182
Joined: Fri Oct 30, 2009 12:15 pm

Re: board-texture in SQL?

Postby kraada » Tue Jun 29, 2010 9:03 am

Yes, all of the ones in the Filters tab are built - that's where I got the above code from.

I'll see what I can find out about two pair boards; I agree there should be a way to do that but I'm not 100% sure there is or if there is, what it is.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: board-texture in SQL?

Postby Darvini » Tue Jun 29, 2010 12:02 pm

How can I find those codes for board textures?
Darvini
 
Posts: 182
Joined: Fri Oct 30, 2009 12:15 pm

Re: board-texture in SQL?

Postby kraada » Tue Jun 29, 2010 1:39 pm

PM me the ones you're interested in and I'll see what I can get for you.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: board-texture in SQL?

Postby devolveNZ » Wed Dec 29, 2010 10:27 pm

You're welcome (and if you find a cleaner way of doing it, please do let me know :)


(holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 -1) % 13)) will tell you the suit of a card (1=c , 14=d, 27=h, 40=s)

so a raindow flop should be:

not((holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 -1) % 13)) = (holdem_hand_summary.card_2 - ((holdem_hand_summary.card_2 -1) % 13))) AND not((holdem_hand_summary.card_1 - ((holdem_hand_summary.card_1 -1) % 13)) = (holdem_hand_summary.card_3 - ((holdem_hand_summary.card_3 -1) % 13))) AND not ((holdem_hand_summary.card_2 - ((holdem_hand_summary.card_2 -1) % 13)) = (holdem_hand_summary.card_3 - ((holdem_hand_summary.card_3 -1) % 13)))

I haven't tested it but I think it should work.
devolveNZ
 
Posts: 31
Joined: Mon Sep 08, 2008 9:27 pm

Re: board-texture in SQL?

Postby kraada » Thu Dec 30, 2010 9:26 am

Oh so much cleaner! Thanks for letting me know about this :)
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

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

Who is online

Users browsing this forum: No registered users and 13 guests

cron