new with 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

new with SQL

Postby c666666 » Thu Jun 04, 2009 12:11 pm

Hi,
I'm starting to use the SQL with PT3. I have a question.

For example:
sum(if[holdem_hand_player_statistics.flg_f_cbet_opp, 1, 0])
What does mean the last 1 and 0 ( ,1,0) ? Where can I find more information about this type of questions for beginners?

Thanks
c666666
 
Posts: 52
Joined: Wed Jun 25, 2008 7:36 pm

Re: new with SQL

Postby kraada » Thu Jun 04, 2009 1:04 pm

This is a column definition in the Holdem Cash Player Statistics section. When a column is calculated there, it loops over every hand for each player.

What it does here is sum up all of the results for each hand (hence the sum()).

What does it sum up?

In this case:

if[holdem_hand_player_statistics.flg_f_cbet_opp, 1, 0]

Which means if holdem_hand_player_statistics.flg_f_cbet_opp (you had a chance to cbet the flop), add 1, otherwise add 0.

So the result is a sum of how many chances you had to cbet the flop.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: new with SQL

Postby WhiteRider » Thu Jun 04, 2009 5:39 pm

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 4 guests