BillGatesIII wrote:gazavat wrote:power( cnt_avg_3B_behind, 1/(2 + substring(cash_hand_summary.str_aggressors_p from 2 for 1)::int))
It says invalid SQL
If I replace (2 + substring(cash_hand_summary.str_aggressors_p from 2 for 1)::int) with an integer, it says valid expression, so it does recognize the power function.
If you replace cnt_avg_3B_behind with a database field, will it validate?
And what are you trying to calculate? I'm puzzled

I cannot replace it because the expression behind it is the division of 2 SUM expressions. Thus, it can only be done as a stat expression using 2 columns. I am forced to do the calculations here as the power function seems not to be recognized in the stat expression field.
Regarding what the stat does, I have a custom stat how often the RFI player faces a 3bet. For example, BTN raises first in and faces a 3bet 20% of the time. This is the result of both SB and BB 3betting. Assuming they use identical 3bet ranges, I am trying to calculate what is the 3bet range of each one. In the particular example it is 10.56% 3bet range for each one so that the BTN gets 3bet a total of 20% by either.
However, this is not too relevant to the issue at hand since comes down to my inability to use the power function within a stat expression and I cannot do the necessary calculations within a column expression without referencing other columns.