filter all players that check/minraised the flop

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

Re: filter all players that check/minraised the flop

Postby booger » Wed Aug 06, 2008 7:33 pm

Hey Chuck,

I need to do the same thing except I want the hold cards from when a player faced with a raise of more than 75% of his stack either called or went all in.

I dont know squadoosh about SQL but this is what I came up with:

##if facing a pre-flop raise
if
tourny_holdem_hand_player_statistics.flg_p_face_raise=true
and
##raise facing is >75*stack at start of hand
tourny_holdem_hand_player_detail.amt_p_raise_faicing >= (75/100)*tourny_holdem_hand_player_detail.amtbefore
and if
##did he:
## call
tourny_holdem_hand_player_statistics.flg_p_ccall = true
or
##reraise
tourny_holdem_hand_player_statistics. Flg_p_3bet=true
or
tourny_holdem_hand_player_statistics. Flg_p_4bet=true
then
output
##player hole cards
tourny_holdem_hand_player_statistics.id_holecards
##player stack
tourny_holdem_hand_player_detail.amt_before
##size of bet
tourny_holdem_hand_player_detail.amt_p_raise_faicing
##player position
tourny_holdem_hand_player_statistics.position
##number of active players behind him
lookup_positions.cnt_players (number of players delt into the hand) - tourny_holdem_hand_player_statistics.position

Can you please help me make this work :)
booger
 
Posts: 50
Joined: Thu Jul 10, 2008 11:45 am

Re: filter all players that check/minraised the flop

Postby banshee » Tue Sep 09, 2008 12:59 pm

Seitz333 wrote:There might be an easier way to show the hole cards using custom reports in PT3, but I have not used the custom reports function so I'm not sure.

To add a table to the PT3 database using pgAdmin:

1. Left click on the database you want to add the table.
2. Expand the database (left click the plus sign).
3. Expand schema's.
4. Expand public.
5. Right click on tables and select 'New Table'.
6. In the name field type 'lookup_cards'.
7. In the Tablespace field click the dropdown and choose 'pg_default'. Then click 'ok'.
8. Right click on the new table and select 'New Object --> New Column'.
9. In the Name field type 'id_card'.
10. In the Data Type field select the dropdown and choose 'integer'.
11. Put a check in the 'NULL' checkbox. Select 'ok'.
12. Right click on the new table and select "New Object --> New Primary Key'.
13. In the Name field type 'lookup_cards_primary_key'.
14. In the Tablespace field select the dropdown and choose 'pg_default'.
15. Click on the 'Columns' tab then click on the dropdown at the bottom and choose 'id_card'. Then click 'Add'. Now click 'ok'.
16. Right click on the new table and select 'New Object --> New Column'.
17. In the Name field type 'card'.
18. In the Data Type field select the dropdown and choose 'character varying'.
19. In the Length field enter '2'.
20. Put a check in the 'NULL' checkbox. Select 'ok'.

DONE!!!!

Don't forget you need to add the 1-52 primary keys and the corresponding cards


hey guys,

I have to repeat the last step (adding the primary keys) of his instructions on another computer and don't know how I did that before. :)
Does someone know?
banshee
 
Posts: 53
Joined: Thu May 08, 2008 6:10 am

Re: filter all players that check/minraised the flop

Postby WhiteRider » Tue Sep 09, 2008 1:09 pm

FYI it's easy to get the hole cards using Custom Stats if that's what you want to do.

Your cards are stored in the DB in fields:
holdem_hand_player_statistics.id_holecard
or individually in:
holdem_hand_player_detail.holecard_1
and
holdem_hand_player_detail.holecard_2

..and you can look up the info:
lookup_from_id(id_holecard,'cardpair')
lookup_from_id(id_holecard1, 'card')
lookup_from_id(id_holecard1, 'card_rank')
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: filter all players that check/minraised the flop

Postby banshee » Wed Sep 10, 2008 5:45 am

Well I'm now trying to filter all hands where players limp/3betted PF and get an output that tells the percentage of every single starting hand they are doing that with. I don't succeed in combining player_statistics and hand_statistics i.e. player limped PF + player has a V$IP from 40+
banshee
 
Posts: 53
Joined: Thu May 08, 2008 6:10 am

Re: filter all players that check/minraised the flop

Postby WhiteRider » Wed Sep 10, 2008 9:06 am

I think what you need to do is create a Custom Stat in the 'holdem cash player statistics' section to calculate the percentage of times they limp/3bet, and then in a Custom Report add a filter for VP$IP > 40, so that the report only includes those players with a high VP, but for those players you will get the correct stat.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: filter all players that check/minraised the flop

Postby gazavat » Mon Jul 08, 2013 2:50 am

WhiteRider wrote:FYI it's easy to get the hole cards using Custom Stats if that's what you want to do.

Your cards are stored in the DB in fields:
holdem_hand_player_statistics.id_holecard
or individually in:
holdem_hand_player_detail.holecard_1
and
holdem_hand_player_detail.holecard_2

..and you can look up the info:
lookup_from_id(id_holecard,'cardpair')
lookup_from_id(id_holecard1, 'card')
lookup_from_id(id_holecard1, 'card_rank')


Where can I find holecard1 and holecard2 in the PT4 DB?
gazavat
 
Posts: 88
Joined: Sat Feb 05, 2011 2:04 am

Re: filter all players that check/minraised the flop

Postby kraada » Mon Jul 08, 2013 8:07 am

In cash_hand_player_statistics. Everything from the player_detail table is in player_statistics now in PT4 (and holdem and omaha were combined).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Previous

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

Who is online

Users browsing this forum: No registered users and 14 guests

cron
highfalutin