Reports only showing global hero stats

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

Reports only showing global hero stats

Postby denutza » Tue Feb 14, 2012 12:39 pm

This seems to be a new problem.

Under Omaha Cash Player Statistics, it really doesnt matter what my SQL code is, it always reports
the same global hero stats based on the Filters (5-6 players at table for example).

Example SQL could be:

Code: Select all
omaha_hand_player_statistics.id_hand in (SELECT omaha_hand_player_statistics.id_hand from player,
omaha_hand_player_statistics WHERE player.id_player = omaha_hand_player_statistics.id_player and player.val_icon_omaha=1
 and omaha_hand_player_statistics.position=8 )


I could change it to something impossible like:

Code: Select all
omaha_hand_player_statistics.id_hand in (SELECT omaha_hand_player_statistics.id_hand from player,
omaha_hand_player_statistics WHERE player.id_player = omaha_hand_player_statistics.id_player and player.val_icon_omaha=999
 and omaha_hand_player_statistics.position=999 )


and the Report Stats will look identical..

This is not exclusive to using the player.val_icon_omaha stat either.

Code: Select all
omaha_hand_player_statistics.id_hand in (SELECT omaha_hand_player_statistics.id_hand from player, omaha_hand_player_statistics
WHERE player.id_player = omaha_hand_player_statistics.id_player  and omaha_hand_player_statistics.flg_p_open and omaha_hand_player_statistics.flg_p_first_raise and
omaha_hand_player_statistics.position=1 )


this code can be changed and the reports generated will not change.



The Omaha Cash Hand section seems to work fine.
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Reports only showing global hero stats

Postby kraada » Tue Feb 14, 2012 1:12 pm

That's decidedly odd. You can see the actual query being run in the PokerTracker.log file - is your filter query being added there when you're in the OHPS section?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Reports only showing global hero stats

Postby denutza » Tue Feb 14, 2012 2:34 pm

It appears to be placing my SQL in the log.

I have two different Report Runs from the log...Each report I use BB/100 and Hands as my stat.
Both report 1.46 bb/100 and 905,452 hands (these #'s represent my total hands ever played along with total
win rate)

First I use val_icon=1 and position=0 (Note that total hands reported should be far less than 905,452 because obviously all my hands were not on button)

Log shows this:

Code: Select all
012/02/14 10:22:43.529: [00000430][Query] Executing SQL (Thread): SELECT sum(amt_bb_won), sum(cnt_hands) FROM ( SELECT (sum( (CASE WHEN ( (omaha_limit.amt_bb *omaha_limit.val_nlpl_mult)) <> 0 THEN ((omaha_hand_player_statistics.amt_won * 1.0 )/( (omaha_limit.amt_bb *omaha_limit.val_nlpl_mult))) ELSE 0 END) )) as "amt_bb_won", (sum((case when(omaha_hand_player_statistics.id_hand > 0) then  1 else  0 end))) as "cnt_hands" FROM       omaha_hand_player_statistics , player, omaha_limit WHERE  (player.id_player = omaha_hand_player_statistics.id_player)  AND (omaha_limit.id_limit = omaha_hand_player_statistics.id_limit)   AND (omaha_hand_player_statistics.id_hand > COALESCE(CAST( (SELECT setting_value FROM settings WHERE setting_name='cache_update:omaha') AS integer ),0) )  AND (omaha_hand_player_statistics.id_player = 4)        AND ((omaha_hand_player_statistics.id_hand in (SELECT omaha_hand_player_statistics.id_hand from player, omaha_hand_player_statistics WHERE player.id_player = omaha_hand_player_statistics.id_player and player.val_icon_omaha=1 and omaha_hand_player_statistics.position=0 ) ))  UNION SELECT sum(omaha_cache.amt_bb_won), sum(omaha_cache.cnt_hands) FROM omaha_cache WHERE  omaha_cache.id_player = 4  ) AS CacheTable 


which looks right....Ill then change it to position=7 and val_icon= ANY number as an example and the change is reflected in the SQL in the log, however the result is the same.
denutza
 
Posts: 105
Joined: Fri May 23, 2008 2:01 am

Re: Reports only showing global hero stats

Postby kraada » Tue Feb 14, 2012 2:51 pm

Ah I think this might be because it's using the cache values - the cache is added up and is the total of all hands and is thus not going to be filtered as you want. I'll have to look into why the cache is being used in this instance - I wouldn't have expected it to be.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


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

Who is online

Users browsing this forum: No registered users and 5 guests