WHERE site_id = '300'

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

WHERE site_id = '300'

Postby TheProdigy » Fri Feb 01, 2008 12:16 am

Hey,

My main Alias is Schwallie4, from Pokerstars. In this alias I have "MoneyOverB" from FTP. When I do a query, my FTP player name doesn't seem to be showing up :(
TheProdigy
 
Posts: 538
Joined: Sun Dec 09, 2007 1:20 am

Re: WHERE site_id = '300'

Postby Josh » Fri Feb 01, 2008 12:17 am

I'm not sure I understand. Are you trying to query from the player table?
Josh
Site Admin
 
Posts: 6222
Joined: Sat Dec 08, 2007 6:03 pm

Re: WHERE site_id = '300'

Postby _dave_ » Fri Feb 01, 2008 12:17 am

post the query please. are you hitting id_player or id_real_player?
_dave_
 
Posts: 1147
Joined: Sun Dec 09, 2007 6:19 pm

Re: WHERE site_id = '300'

Postby TheProdigy » Mon Feb 04, 2008 12:57 am

Sorry,

The where clause was just:

FROM player p, holdem_hand_player_statistics hhps
WHERE p.id_player = hhps.id_player AND p.id_site = 300

And I was just wanting to get my alias in the result as well, but my alias is 'Schwallie4' from PStars, with 'MoneyOverB' from FTP attached to it. The FTP name doesn't seem to be showing up(or Schwallie4 either)
TheProdigy
 
Posts: 538
Joined: Sun Dec 09, 2007 1:20 am

Re: WHERE site_id = '300'

Postby Josh » Mon Feb 04, 2008 8:55 am

If "Schwallie4" is the name you have your aliases set to, then you can't use the id_site=300 filter.
Josh
Site Admin
 
Posts: 6222
Joined: Sat Dec 08, 2007 6:03 pm

Re: WHERE site_id = '300'

Postby TheProdigy » Mon Feb 04, 2008 11:59 am

So what kind've clause would I use to get my alias that I play on Full Tilt with to show up? Like I am doing a list of regulars and want my name in there too, but since it is an alias I can't get it to come up?
TheProdigy
 
Posts: 538
Joined: Sun Dec 09, 2007 1:20 am

Re: WHERE site_id = '300'

Postby Josh » Mon Feb 04, 2008 12:18 pm

If you want all the hands you've played (like PT3 does when you view your stats, alias hands and all), just search for your primary player id. If you want just the hands played by this alias, you need to use the id_player_real field.
Josh
Site Admin
 
Posts: 6222
Joined: Sat Dec 08, 2007 6:03 pm

Re: WHERE site_id = '300'

Postby TheProdigy » Mon Feb 04, 2008 3:26 pm

What I would want is hands played by me on a certain site, but I wouldn't be searching for me by myself. I would be searching a huge number of things, and I would simply only want the stats of mine that qualify to show up. So basically, I have an alias 'Schwallie4' from PS, but a name attached to it is my FTP name. When I search for hands from FTP, I would want my FTP name to show up as well.

Sorry I am being so bad at explaining this, but basically if I add a name to Schwallie4, does the FTP name(the one I attached) just get deleted for queries? Or in id_site does Schwallie4 now have "PS, FTP" listed so that if I do a query of either then the name would show up either way since I did play on both sites? Basically I just don't understand why my name isn't showing up in the queries even when I played on both sites.
TheProdigy
 
Posts: 538
Joined: Sun Dec 09, 2007 1:20 am

Re: WHERE site_id = '300'

Postby Josh » Mon Feb 04, 2008 6:40 pm

The hands are still labeled under the site they are played on, so just filter by FTP and your PS alias will show just your FTP hands.
Josh
Site Admin
 
Posts: 6222
Joined: Sat Dec 08, 2007 6:03 pm

Re: WHERE site_id = '300'

Postby TheProdigy » Mon Feb 04, 2008 7:43 pm

Hey,

It isn't showing up in the query I run though. Here it is. I have about 45 names show up, but mine is nowhere to be found. I fit in between the 11.9 and 22 vpip range as well


SELECT
p.player_name,
COUNT(hhps.id_player) AS hands,
SUM (amt_won) AS monies,
AVG (CASE WHEN flg_vpip THEN 1 ELSE 0 END)*100 AS vpip,
AVG (CASE WHEN cnt_p_raise >= 1 THEN 1 ELSE 0 END)*100 AS pfr,
AVG (CASE WHEN flg_p_3bet THEN 1 WHEN flg_p_3bet_opp THEN 0 END)*100 AS threebet,
AVG (CASE WHEN enum_p_3bet_action = 'F' THEN 1 WHEN flg_p_3bet_def_opp THEN 0 END)*100 AS fold_to_threebet,
AVG (CASE WHEN enum_p_3bet_action = 'C' THEN 1 WHEN flg_p_3bet_def_opp THEN 0 END)*100 AS call_to_threebet,
AVG (CASE WHEN enum_p_3bet_action = 'R' THEN 1 WHEN flg_p_3bet_def_opp THEN 0 END)*100 AS raise_to_threebet,
AVG (CASE WHEN enum_p_3bet_action = 'F' AND flg_p_first_raise THEN 1 WHEN flg_p_3bet_def_opp AND flg_p_first_raise THEN 0 END)*100 AS fold_facing_threebet_as_pfr,
AVG (CASE WHEN enum_p_3bet_action = 'C' AND flg_p_first_raise THEN 1 WHEN flg_p_3bet_def_opp AND flg_p_first_raise THEN 0 END)*100 AS call_facing_threebet_as_pfr,
AVG (CASE WHEN enum_p_3bet_action = 'R' AND flg_p_first_raise THEN 1 WHEN flg_p_3bet_def_opp AND flg_p_first_raise THEN 0 END)*100 AS raise_facing_threebet_as_pfr,
AVG (CASE WHEN flg_showdown AND flg_vpip THEN 1 WHEN flg_vpip THEN 0 END)*100 AS wtsd,
AVG (CASE WHEN flg_f_cbet THEN 1 WHEN flg_f_cbet_opp THEN 0 END)*100 AS cbet,
AVG (CASE WHEN flg_f_cbet AND flg_f_3bet_opp AND flg_f_fold AND flg_f_4bet_def_opp = 'f' THEN 1 WHEN flg_f_cbet AND flg_f_3bet_opp AND flg_f_4bet_def_opp = 'f' THEN 0 END)*100 AS fold_when_cbet_raise,
AVG (CASE WHEN flg_f_cbet AND flg_f_3bet_opp AND cnt_f_call >=1 AND flg_f_4bet_def_opp = 'f' THEN 1 WHEN flg_f_cbet AND flg_f_3bet_opp AND flg_f_4bet_def_opp = 'f' THEN 0 END)*100 AS call_when_cbet_raise,
AVG (CASE WHEN flg_f_cbet AND flg_f_3bet_opp AND cnt_f_raise >=1 AND flg_f_4bet_def_opp = 'f' THEN 1 WHEN flg_f_cbet AND flg_f_3bet_opp AND flg_f_4bet_def_opp = 'f' THEN 0 END)*100 AS raise_when_cbet_raise,
AVG (CASE WHEN flg_f_cbet AND flg_p_3bet THEN 1 WHEN flg_f_cbet_opp AND flg_p_3bet THEN 0 END)*100 AS cbet_after_pf_3bet


FROM player p, holdem_hand_player_statistics hhps
WHERE p.id_player = hhps.id_player AND p.id_site = 300 AND date_played > '01-Jan-2008'
GROUP BY p.player_name
HAVING COUNT(hhps.id_player) > 3100 AND AVG (CASE WHEN flg_vpip THEN 1 ELSE 0 END)*100 > 11.9 AND AVG (CASE WHEN flg_vpip THEN 1 ELSE 0 END)*100 <22
ORDER BY COUNT(hhps.id_player) DESC;
TheProdigy
 
Posts: 538
Joined: Sun Dec 09, 2007 1:20 am

Next

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

Who is online

Users browsing this forum: No registered users and 0 guests