First fix for sqlite in PlayerStats

Fix courtesy of Eleatic Stranger on 2+2 - Page still does not work, need to find an sqlite equivalent to to_char() and variance()
This commit is contained in:
Worros 2009-11-02 13:38:36 +08:00
parent 97d2052cbe
commit f4aa5f1fe1

View File

@ -1895,9 +1895,9 @@ class Sql:
self.query['playerDetailedStats'] = """ self.query['playerDetailedStats'] = """
select <hgameTypeId> AS hgametypeid select <hgameTypeId> AS hgametypeid
,gt.base ,gt.base
,gt.category ,gt.category AS category
,upper(gt.limitType) AS limittype ,upper(gt.limitType) AS limittype
,s.name ,s.name AS name
,min(gt.bigBlind) AS minbigblind ,min(gt.bigBlind) AS minbigblind
,max(gt.bigBlind) AS maxbigblind ,max(gt.bigBlind) AS maxbigblind
/*,<hcgametypeId> AS gtid*/ /*,<hcgametypeId> AS gtid*/
@ -1939,7 +1939,8 @@ class Sql:
,100.0*avg((hp.totalProfit+hp.rake)/(gt.bigBlind+0.0)) AS bb100xr ,100.0*avg((hp.totalProfit+hp.rake)/(gt.bigBlind+0.0)) AS bb100xr
,avg((hp.totalProfit+hp.rake)/100.0) AS profhndxr ,avg((hp.totalProfit+hp.rake)/100.0) AS profhndxr
,avg(h.seats+0.0) AS avgseats ,avg(h.seats+0.0) AS avgseats
,variance(hp.totalProfit/100.0) AS variance /*,variance(hp.totalProfit/100.0) AS variance*/
,0.0 AS variance
from HandsPlayers hp from HandsPlayers hp
inner join Hands h on (h.id = hp.handId) inner join Hands h on (h.id = hp.handId)
inner join Gametypes gt on (gt.Id = h.gameTypeId) inner join Gametypes gt on (gt.Id = h.gameTypeId)