Page 1 of 2
To Separate Second pair from third

Posted:
Fri Jul 28, 2017 2:51 pm
by Guest666
Hi, Is there a way like that to separate second pair from third? Now I use for second pair code "tourney_hand_player_combinations.flg_f_1pair and tourney_hand_player_combinations.id_f_hand_strength=2" but it include third and fourth pairs too. I need to determinate only second pair. Thank you!
Re: To Separate Second pair from third

Posted:
Sat Jul 29, 2017 6:04 am
by Flag_Hippo
Unfortunately there is no way to tell which middle pair you have using tourney_hand_player_combinations.flg_x_1pair and tourney_hand_player_combinations.id_x_hand_strength=2 which filters for pairs between top and bottom pair but it should work for the flop as you have specified because third pair on the flop would be the bottom pair.
Re: To Separate Second pair from third

Posted:
Sat Jul 29, 2017 9:51 am
by Guest666
Thank you for answer!
I need this for River
Is there a way like that to test code without searching hand in database? flg_f_1pair will be worked on river?
Re: To Separate Second pair from third

Posted:
Sat Jul 29, 2017 3:26 pm
by Flag_Hippo
If you want that for the river just change the 'f' to 'r' (or 't' for the turn):
- Code: Select all
tourney_hand_player_combinations.flg_r_1pair and tourney_hand_player_combinations.id_r_hand_strength=2
If your building a custom stat you can test these expressions at anytime in 'My Reports' with the method described
here.
Re: To Separate Second pair from third

Posted:
Mon Jul 31, 2017 6:34 am
by Guest666
May be is there way compare turn and flop card ranks? For example, if we want find middle pair turn:
- Code: Select all
flg_f_1pair and id_f_hand_strength=2 and rank_turn < rank_hight_flop
Re: To Separate Second pair from third

Posted:
Mon Jul 31, 2017 7:08 am
by Flag_Hippo
That might be possible by comparing card values individually but that would require a more complex query.
Re: To Separate Second pair from third

Posted:
Mon Jul 31, 2017 9:10 am
by Guest666
Do you mean card_1 ... card_5 in tourney_hand_summary? Or is there something else?
Is there a way to made column, which I can use in another column? for example column high_rank_flop
Re: To Separate Second pair from third

Posted:
Mon Jul 31, 2017 12:07 pm
by Flag_Hippo
Yes you would need to compare those card values in some way but as I mentioned that would be a very complex query to build which is beyond my own SQL knowledge.
Re: To Separate Second pair from third

Posted:
Thu Aug 03, 2017 12:39 pm
by BillGatesIII
Guest666 wrote:Do you mean card_1 ... card_5 in tourney_hand_summary? Or is there something else?
Is there a way to made column, which I can use in another column? for example column high_rank_flop
If you do a search for 'intarray' on the forums you'll find a more easy solution for this.
Re: To Separate Second pair from third

Posted:
Sat Aug 05, 2017 2:38 am
by Guest666
BillGatesIII wrote:If you do a search for 'intarray' on the forums you'll find a more easy solution for this.
Thank you!
It turned out like this, but too cumbersome because A-high boards sorted since Ace=0
May be is there way more compact? Needed to assign an ace to rank 13
Middle pair on Turn:
- Code: Select all
tourney_hand_player_combinations.flg_t_1pair and
(
tourney_hand_player_statistics.flg_t_saw and
(
((array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13] @> '{0}')) ##Ace high boards
and
(
(sort(array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13]))[4]=tourney_hand_player_statistics.holecard_1%13
or
(sort(array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13]))[4]=tourney_hand_player_statistics.holecard_2%13
)
)
OR
(
(sort(array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13]))[1]>0 and ##Non-Ace high boards
(
(sort(array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13]))[3]=tourney_hand_player_statistics.holecard_1%13
OR
(sort(array[tourney_hand_summary.card_1%13,tourney_hand_summary.card_2%13,tourney_hand_summary.card_3%13,tourney_hand_summary.card_4%13]))[3]=tourney_hand_player_statistics.holecard_2%13
)
)
)