Page 1 of 2

Expression filters

PostPosted: Thu Apr 04, 2013 4:52 am
by summy
Hey,

I'd like to have an expression filter vs specific types of opponents.
One would be vs players in the BB folding < 40 vs btn open (have made a custom stat for that) and another one reverse
when I'm in the BB and they open > 60 from the btn.
Would be cool to see how I'm doing in both scenarios.
Could you give me the expressions for that? I realize it will probably take a long time to return data but that's ok :).

Thanks.

Re: Expression filters

PostPosted: Thu Apr 04, 2013 9:36 am
by kraada
Could you put your custom stat up on the Warehouse? That would make this a lot easier to build.

Re: Expression filters

PostPosted: Thu Apr 04, 2013 10:00 am
by summy

Re: Expression filters

PostPosted: Fri Apr 05, 2013 5:09 am
by summy
Bump since this dropped off the first page and I might been forgotten :D

Re: Expression filters

PostPosted: Fri Apr 05, 2013 8:23 am
by kraada
I haven't forgotten, I just need a little time to make it happen and yesterday turned out a bit busier than expected. :)

Re: Expression filters

PostPosted: Tue Apr 09, 2013 2:05 pm
by summy
:cry:

Re: Expression filters

PostPosted: Tue Apr 09, 2013 4:23 pm
by kraada
Sorry for the delay. These can take some time.

Either way it's ready now :)

Here's your filters.

For you're in the BB and the BTN opens > 60%, filter for generally being in the BB and facing a steal using Simple Filters. Then add this to get raises only from the button where he had a button open percentage of > 60%:

cash_hand_player_statistics.id_hand in (SELECT chps.id_hand from cash_hand_player_statistics chps, cash_cache cc where chps.id_player = cc.id_player and chps.position = 0 and chps.flg_steal_att GROUP BY chps.id_player, chps.id_hand HAVING (( (CASE WHEN sum(cc.cnt_p_open_opp_btn) <> 0 THEN (((sum(cc.cnt_p_rfi_btn) * 1.0)* 1.0 )/((sum(cc.cnt_p_open_opp_btn) * 1.0) * 100.0 )) ELSE 0 END) ) >= 60))

And for the other side, filter for hands where you're on the button and made a steal using Simple Filters. Add this filter expression to get all hands where the BB faced a steal and he folds < 40% vs a button open:

cash_hand_player_statistics.id_hand in (SELECT chps.id_hand from cash_hand_player_statistics chps, cash_cache cc where chps.id_player = cc.id_player and chps.position = 8 and chps.flg_steal_def_opp and cc.position = 8 GROUP BY chps.id_player, chps.id_hand HAVING (( (CASE WHEN sum(cc.cnt_p_3bet_opp_vs_btn_open) <> 0 THEN (((sum(cc.cnt_p_3bet_opp_vs_btn_open) * 1.0) - (sum(cc.cnt_p_call_vs_btn_open)* 1.0) - (sum(cc.cnt_p_3bet_vs_btn_open) ))/((sum(cc. cnt_p_3bet_opp_vs_btn_open) * 1.0) * 100.0 )) ELSE 0 END) ) <= 40))

I haven't had a time to go through exhaustively and make sure that checks all cases though but give it a spin and let me know if it gives you any trouble.

Re: Expression filters

PostPosted: Wed Apr 10, 2013 6:44 am
by summy
Thanks a lot kraada.

Unfortunately the first filter doesn't return any results for me and the 2nd one seems to be invalid.

Re: Expression filters

PostPosted: Wed Apr 10, 2013 10:16 am
by kraada
Try this instead of the second one:

cash_hand_player_statistics.id_hand in (SELECT chps.id_hand from cash_hand_player_statistics chps, cash_cache cc where chps.id_player = cc.id_player and chps.position = 8 and chps.flg_steal_def_opp and cc.position_type = 4 GROUP BY chps.id_player, chps.id_hand HAVING (( (CASE WHEN sum(cc.cnt_p_3bet_opp_vs_btn_open) <> 0 THEN (((sum(cc.cnt_p_3bet_opp_vs_btn_open) * 1.0) - (sum(cc.cnt_p_call_vs_btn_open)* 1.0) - (sum(cc.cnt_p_3bet_vs_btn_open) ))/((sum(cc. cnt_p_3bet_opp_vs_btn_open) * 1.0) * 100.0 )) ELSE 0 END) ) <= 40))

The first should be working, I don't know why it's not returning data for you unless that situation simply isn't in the database.

Re: Expression filters

PostPosted: Wed Apr 10, 2013 12:21 pm
by summy
Still says expression is not valid.

Tryed the first one again but yea doesn't return anything.
I'm using the filter on a small db with 5k+ hands so that it would return results faster, don't know if that changes anything?
Anyways the situation is definitely given, also lowered it to 10% but still nothing :(.