TPS displays ROI%
This commit is contained in:
parent
33760fae9c
commit
ed096b6872
|
@ -85,10 +85,10 @@ class GuiTourneyPlayerStats (threading.Thread):
|
|||
, ["2nd", True, "2nd", 1.0, "%1.0f", "str"]
|
||||
, ["3rd", True, "3rd", 1.0, "%1.0f", "str"]
|
||||
, ["unknownRank", True, "unknown", 1.0, "%1.0f", "str"]
|
||||
#, ["roi", True, "ROI", 1.0, "%3.1f", "str"]
|
||||
, ["invested", True, "Invested", 1.0, "%3.2f", "str"]
|
||||
, ["profit", True, "Profit", 1.0, "%3.2f", "str"]]
|
||||
|
||||
, ["spent", True, "Spent", 1.0, "%3.2f", "str"]
|
||||
, ["won", True, "Won", 1.0, "%3.2f", "str"]
|
||||
, ["roi", True, "ROI%", 1.0, "%3.0f", "str"]]
|
||||
|
||||
self.stats_frame = gtk.Frame()
|
||||
self.stats_frame.show()
|
||||
|
||||
|
|
|
@ -2269,8 +2269,9 @@ class Sql:
|
|||
,SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS 1st
|
||||
,SUM(CASE WHEN rank = 2 THEN 1 ELSE 0 END) AS 2nd
|
||||
,SUM(CASE WHEN rank = 3 THEN 1 ELSE 0 END) AS 3rd
|
||||
,SUM(tp.winnings)/100.0 AS profit
|
||||
,SUM(tt.buyin+tt.fee)/100.0 AS invested
|
||||
,SUM(tp.winnings)/100.0 AS won
|
||||
,SUM(tt.buyin+tt.fee)/100.0 AS spent
|
||||
,SUM(tp.winnings)/SUM(tt.buyin+tt.fee)*100.0-100 AS roi
|
||||
from TourneysPlayers tp
|
||||
inner join Tourneys t on (t.id = tp.tourneyId)
|
||||
inner join TourneyTypes tt on (tt.Id = t.tourneyTypeId)
|
||||
|
|
Loading…
Reference in New Issue
Block a user