The 'holdem_hand_player_detail' table is for PokerTracker 3 so for PokerTracker 4 stats you would need to replace that with 'cash_hand_player_statistics' instead: sum(if[lookup_actions_p.action = 'C' and not(cash_hand_player_statistics.flg_p_face_raise) and cash_hand_player_statistics.amt_f_bet_faci...