To Separate Second pair from third

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

To Separate Second pair from third

Postby Guest666 » Fri Jul 28, 2017 2:51 pm

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!
Guest666
 
Posts: 22
Joined: Fri Aug 14, 2009 6:05 pm

Re: To Separate Second pair from third

Postby Flag_Hippo » Sat Jul 29, 2017 6:04 am

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.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: To Separate Second pair from third

Postby Guest666 » Sat Jul 29, 2017 9:51 am

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?
Guest666
 
Posts: 22
Joined: Fri Aug 14, 2009 6:05 pm

Re: To Separate Second pair from third

Postby Flag_Hippo » Sat Jul 29, 2017 3:26 pm

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.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: To Separate Second pair from third

Postby Guest666 » Mon Jul 31, 2017 6:34 am

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
Guest666
 
Posts: 22
Joined: Fri Aug 14, 2009 6:05 pm

Re: To Separate Second pair from third

Postby Flag_Hippo » Mon Jul 31, 2017 7:08 am

That might be possible by comparing card values individually but that would require a more complex query.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: To Separate Second pair from third

Postby Guest666 » Mon Jul 31, 2017 9:10 am

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
Guest666
 
Posts: 22
Joined: Fri Aug 14, 2009 6:05 pm

Re: To Separate Second pair from third

Postby Flag_Hippo » Mon Jul 31, 2017 12:07 pm

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.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: To Separate Second pair from third

Postby BillGatesIII » Thu Aug 03, 2017 12:39 pm

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.
BillGatesIII
 
Posts: 740
Joined: Fri Dec 16, 2011 6:50 pm

Re: To Separate Second pair from third

Postby Guest666 » Sat Aug 05, 2017 2:38 am

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
 )
)
)
Guest666
 
Posts: 22
Joined: Fri Aug 14, 2009 6:05 pm

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 21 guests

cron