Filter Antes - Understanding 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

Filter Antes - Understanding Sql

Postby Gigabet » Thu May 20, 2010 7:40 am

I am sorry for asking this, as it seems awfully simple, I just can't seem to get it. I am trying to create a filter for the tournament hands section. I open configure stats dialog, then click the "holdem tournament hand" field, then navigate to the columns tab. I select new and this is where I get stuck.

I am trying to create a filter that shows only hands played where an ante was posted, by the active player. Does the naming convention matter? I did name it flg_ante, not sure if that matters or not.

My best guess of the expression is holdem_hand_player_statistics.flg_ante. That won't validate, nor variations of that. There seems something fundamentally wrong with how I am presenting the expression, but I don't know what.

I am sure some of you SQL geniuses were poker players before you learned SQL. What tools did you use to help you learn when you were just starting with it. I understand the basic theory behind a relational database, but my mind won't extrapolate that model into anything practical. I don't see anything about the structure or syntax that makes sense, like in normal programming languages, seeing something new often would allow you make inferences that generally were correct. Wading through google is only teaching me the theoretical aspects behind DBMS or putting me way over my head in a straightforward instruction course.

Thanks for your help
Gigabet
 
Posts: 9
Joined: Sun Feb 17, 2008 1:57 pm

Re: Filter Antes - Understanding Sql

Postby Gigabet » Thu May 20, 2010 8:28 am

I guess the expression is already in the simple filters page, so I should be able to look it up. I don't understand why it wouldn't be in the columns tab of the configure stats dialog.
Gigabet
 
Posts: 9
Joined: Sun Feb 17, 2008 1:57 pm

Re: Filter Antes - Understanding Sql

Postby kraada » Thu May 20, 2010 9:02 am

It's not in the columns because there are no built in hand statistics that use that value at this point in time.

The value you're looking for is:
tourney_holdem_hand_player_detail.amt_ante

You can find a full list of our database fields in the database schema. I realize it's a bit long though so if there are any others you're looking for feel free to ask.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filter Antes - Understanding Sql

Postby Gigabet » Thu May 20, 2010 9:58 am

Thank you for the quick response. I am not asking for you to give me a beginners course to sql here on the forums but could you explain the structure to the following expression.

tourney_holdem_hand_player_detail.amt_ante


The query I want is boolean, which I thought were marked with a flg. Is that simply a naming convention to reduce human error and this expression is just an oversight? Or does SQL need the flg to return the query with an appropriate response? If not flg, what syntax declares that query as boolean?
Gigabet
 
Posts: 9
Joined: Sun Feb 17, 2008 1:57 pm

Re: Filter Antes - Understanding Sql

Postby kraada » Thu May 20, 2010 10:04 am

amt_ante is the amount of the ante.

If you want to check for any ante at all you'd want tourney_holdem_hand_player_detail.amt_ante > 0. Or you could check for only hands where the ante is 25 with tourney_holdem_hand_player_detail.amt_ante = 25. It all depends on exactly what you're trying to do, but any sort of comparison operator will work and result in a boolean value.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filter Antes - Understanding Sql

Postby Gigabet » Thu May 20, 2010 10:59 am

I found several work arounds to get the desired result(manually checking the blind limit boxes in the simple filter page seemed to be the most accurate method, also quite tedious. I wanted a single elegant expression for easy use in custom reports.

If you want to check for any ante at all you'd want tourney_holdem_hand_player_detail.amt_ante > 0


I think this is what I want. Will this filter the hands tab on the tournament page to remove all hands where there were no antes in play? The hand results in tournament hand section of custom reports seems to respond to the same filters that the hands tab responds to. Also, can I edit the above expression to tourney_holdem_hand_player_detail.amt_ante = 0 to get all hands that were played with no antes.

I am pretty new at this, so I don't really know exactly what I want to do with this. In general terms, I am trying to show myself a "proof of concept." There are a lot of people who don't really understand the concept of pot odds, the underlying reasons of standard bet sizes and such. Their misunderstanding doesn't show itself very frequently, however, because the standard of open of 3 to 5xs the big blind is rarely a mistake.

It becomes visible when they are 3 betting preflop with limpers and antes however. This type of player, ie most, will not be making their reraise high enough to correctly price the field out from calling. Because this is an event that, even when rarely occuring is even more rarely exploited. Add to that the perception bias that goes a long with correctly exploiting that mistake,yet losing the individual hand in question, makes this particular concept very difficult to grasp as something that needs to be actively exploited.

If I create a few custom reports and sort the data correctly, then compare it to data from players who I judge to be similar with the exception of their bets being sized correctly, then I should see the proof of concept. It is also good practice making reports.
Gigabet
 
Posts: 9
Joined: Sun Feb 17, 2008 1:57 pm

Re: Filter Antes - Understanding Sql

Postby kraada » Thu May 20, 2010 11:10 am

Yes you can check to see if the value is zero in order to find hands that exclude antes altogether. This is something you'd be using in the blue Filters section of a custom report.

If you want to filter the main tabs, you can only use the Filters button at the top right. There is a filter for Post Ante (on the Actions -> Preflop tab) but using that you can only check for whether a player has (or has not) posted an ante.

Good luck in your research!
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Filter Antes - Understanding Sql

Postby sethseth » Tue Feb 15, 2011 10:31 pm

Can I use this on the hud to see someone's vpip, pfr, steal, 3b, etc in only ante games?
sethseth
 
Posts: 16
Joined: Mon Apr 21, 2008 5:31 am

Re: Filter Antes - Understanding Sql

Postby WhiteRider » Wed Feb 16, 2011 4:35 am

The easiest way to do that is to enable the "only stats from current tournament level" HUD Option, but that will limit stats to the specific level, not just those without antes.

Alternatively you would need to build custom versions of all the stats that you want to see and include a check for the ante amount being zero, and create a new HUD Profile to display them.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests