I'm traying to do a ev roi for all the games I play.
I'm just using a simple formula
roi = (chips ev - rake chips)*100 / starting chips
I'm not sure if this is incorrect, but still I whant to do it with this formula.
So, to count starting chips, I'm using this colum (amt_starting_stack):
- Code: Select all
select distinct first_value(thps.amt_before) over (partition by thps.id_tourney order by thps.date_played)
from tourney_hand_player_statistics as thps
join tourney_summary as ts on ts.id_tourney = thps.id_tourney
where thps.flg_hero
and ts.tourney_no = tourney_summary.tourney_no
and for the chipsEV/tourney I'm using the stat from the warehouse:
- Code: Select all
amt_expected_won / cnt_tourneys
with the expression:
- Code: Select all
format_number(amt_expected_won / cnt_tourneys, 0, true, true)
Now, here is what I cant understand: How can I use the expression in another stat?
Please help, when finished I will be uploading the stat.