Debido a los recientes cambios en el sistema VIP de PokerStars, ahora se repartirán los VPPs según lo que uno contribuya al bote. Os dejo cómo calcular en 5 minutitos los VPPs que habríais generado el año pasado según vuestro estilo de juego (C&P de un post mío en PokerStrategy):
(A los que no os vaya el script, copiar y pegar el de aquí Si os sigue sin ir, probablemente sea por culpa del idioma de instalación del postgresql. Otro posible problema y solución dada por GusanoZ:
********** Error **********
ERROR: syntax error at or near “dealt””
Estado SQL:42601
Caracter: 2505
[23:06:46] Gusano: ahi lo veras mejor
[23:07:07] Gusano: es raro
[23:07:19] Gusano: no es rakeamount en lugar de rake?
[23:08:11] Gusano: vale, es que no debe haber espacios
[23:08:14] Gusano: ya lo solucioné
[23:08:18] Gusano: soy informatico lol
[23:08:26] Gusano: hay que poner “Rakedealt”
)
Muchos estáis intentando calcular los nuevos VPPs. Os dejo los pasos para saber en 3 minutos y según vuestros stats, qué VPPs habríais logrado para que podáis compararlo con los reales.
(Si no se ve bien la imagen, descargar desde aquí: [URL]http://www.megaupload.com/?d=RUGC4740[/URL]). Debajo os describo los pasos.

Nuevo sistema VPPs
Pasos (sólo para HM1):
Abrir el pgadmin IIIClick en PostgreSQL.
La contraseña suele ser postgresql.
Seleccionar nuestra base de datos.
Darle al botón que tiene una lupa y ‘SQL’ escrito o bien un papel con ‘SQL’ escrito (la descripción del botón se llama ‘Execute Arbitrary SQL queries’.
Copiar el script en la ventana que sale y darle al F5.
Esperar un par de horas a que termine la consulta de toda la BD. Veremos dos resultados, uno los VPPs obtenidos y otro los que hubieramos obtenido con el nuevo sistema.
El script a copiar es el siguiente:
create or replace function amountPreflopInvested(tn playerhandscashmisc, pkh_id integer) returns integer AS $$
DECLARE
amount integer := 0;
other integer := 0;
BEGIN
amount := tn.postamountpreflop + tn.betamountpreflop + tn.callamountpreflop;
select max(pre.postamountpreflop + pre.betamountpreflop + pre.callamountpreflop) into other from pokerhands join playerhandscashkeycolumns using (pokerhand_id) join playerhandscashmisc pre using (playerhand_id) where pokerhand_id=pkh_id and not ishero;
return least(amount, other);
END;
$$ language plpgsql;
create or replace function amountFlopInvested(tn playerhandsflop, pkh_id integer) returns integer AS $$
DECLARE
amount integer := 0;
other integer := 0;
BEGIN
amount := tn.betamount + tn.callamount;
select max(flop.betamount+flop.callamount) into other from pokerhands join playerhandscashkeycolumns using (pokerhand_id) join playerhandscashmisc using (playerhand_id) join playerhandsflop flop using(playerhand_id) where pokerhand_id=pkh_id and not ishero;
return least(amount, other);
END;
$$ language plpgsql;
create or replace function amountTurnInvested(tn playerhandsturn, pkh_id integer) returns integer AS $$
DECLARE
amount integer := 0;
other integer := 0;
BEGIN
amount := tn.betamount + tn.callamount;
select max(turn.betamount+turn.callamount) into other from pokerhands join playerhandscashkeycolumns using (pokerhand_id) join playerhandscashmisc using (playerhand_id) join playerhandsturn turn using(playerhand_id) where pokerhand_id=pkh_id and not ishero;
return least(amount, other);
END;
$$ language plpgsql;
create or replace function amountRiverInvested(tn playerhandsriver, pkh_id integer) returns integer AS $$
DECLARE
amount integer := 0;
other integer := 0;
BEGIN
amount := tn.betamount + tn.callamount;
select max(river.betamount+river.callamount) into other from pokerhands join playerhandscashkeycolumns using (pokerhand_id) join playerhandscashmisc using (playerhand_id) join playerhandsriver river using(playerhand_id) where pokerhand_id=pkh_id and not ishero;
return least(amount, other);
END;
$$ language plpgsql;
select count(*) as “Hands”, sum(round(b.rakeamount))/100.0 as “Rake dealt”,
sum ( round(a.rakeamount * 1.* (
case when (b.maxstreetseen=0 or b.streetwentallin=1) then (amountPreflopInvested(c, a.pokerhand_id))
when (b.maxstreetseen=1 or b.streetwentallin=2) then (c.postamountpreflop + c.betamountpreflop + c.callamountpreflop + amountFlopInvested(f, a.pokerhand_id))
when (b.maxstreetseen=2 or b.streetwentallin=3) then (c.postamountpreflop + c.betamountpreflop + c.callamountpreflop + f.betamount + f.callamount + amountTurnInvested(t, a.pokerhand_id))
else (c.postamountpreflop + c.betamountpreflop + c.callamountpreflop + f.betamount + f.callamount + t.betamount + t.callamount + amountRiverInvested(r, a.pokerhand_id)) end
) / (a.potsize))
) / 100.0 as “WC Rake”
from pokerhands a join playerhandscashkeycolumns b using (pokerhand_id) join playerhandscashmisc c using (playerhand_id)
left join playerhandsflop f using(playerhand_id) left join playerhandsturn t using(playerhand_id) left join playerhandsriver r using(playerhand_id)
where ishero and potsize>0 and a.handtimestamp>’2011-01-01 00:00:00′ and a.site_id=2;
Yo pierdo poquito porque juego SH y bastante loose, pero creo que los jugadores de FR, otras modalidades y tirando a nits, perdéis mucho rakeback
Samy – DeluxeSamy – Samy4ever