PDA

View Full Version : CustomStats file syntax ?



Alix
11-30-2009, 04:22 AM
I'm having some trouble getting some queries into reports, and I wonder if the hm team could make available the spec for the CustomStats file.

I've been working by imitation of their own reports, but some things are still mysterious to me.

For instance I have this SQL query that is supposed to get all hands won after calling 3 barrels :

select * from playerhandscashkeycolumns ph
inner join playerhandsflop Flop on ph.playerhand_id = Flop.playerhand_id
inner join playerhandsturn Turn on ph.playerhand_id = Turn.playerhand_id
inner join playerhandsriver River on ph.playerhand_id = River.playerhand_id
where
ph.player_id = 65 and
(ph.netamountwon > 0 and ph.maxstreetseen = 4 and (
(ph.FirstPreflopActionType_ID = 2 and ph.preflopaction_id = 3)
or ( ph.preflopaction_ID in (0,1,2) and ph.preflopplayeractiontype_id between 46 and 55)
and (ph.flopfacingcbet = true and FLOP.raisedcbet = false)
and (ph.Turnfacingcbet = true and TURN.raisedcbet = false)
and (ph.Riverfacingcbet = true and RIVER.raisedcbet = false)))

this does return 414 lines on my db from pgAdminIII

But when I put it in "report" form in CustomStats :

<Stat GroupName="Default" ColumnName="WonShowdownAfterCalling3Barrels"
ValueExpressions="sum(case when (ph.netamountwon > 0 and ph.maxstreetseen = 4 and (
(ph.FirstPreflopActionType_ID = 2 and ph.preflopaction_id = 3)
or ( ph.preflopaction_ID in (0,1,2) and ph.preflopplayeractiontype_id between 46 and 55)
and (ph.flopfacingcbet = true and FLOP.raisedcbet = false)
and (ph.Turnfacingcbet = true and TURN.raisedcbet = false)
and (ph.Riverfacingcbet = true and RIVER.raisedcbet = false))) then 1 else 0 end) as WonShowdownCall3B;"
Evaluate=" WonShowdownCall3B" ColumnHeader="W$SDC3B" ColumnFormat="0" ColumnWidth="61" Tooltip=" " />

I get "na" in the corresponding report column

Any idea of what I'm missing ?

fozzy71
11-30-2009, 11:40 AM
I have forwarded this thread to the developer for a reply.