diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index cc50633b..feb3a67f 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2324,6 +2324,18 @@ class Sql: end ) end AS steals + ,case when sum(cast(hp.success_Steal as integer)) = 0 then -999 + else 100.0 * + sum(cast(hp.success_Steal as integer)) + / + sum(case hp.position + when 'S' then cast(hp.raisedFirstIn as integer) + when '0' then cast(hp.raisedFirstIn as integer) + when '1' then cast(hp.raisedFirstIn as integer) + else 0 + end + ) + end AS suc_steal ,100.0*sum(cast(hp.street1Seen as integer))/count(1) AS saw_f ,100.0*sum(cast(hp.sawShowdown as integer))/count(1) AS sawsd ,case when sum(cast(hp.street1Seen as integer)) = 0 then -999