game_stats['total_destroys'], game_stats['total_dhk'], \r
game_stats['total_pushes'], game_stats['total_pushed'], \r
game_stats['total_carrier_frags'], \r
- game_stats['total_alivetime']) = DBSession.\\r
+ game_stats['total_alivetime'],\r
+ game_stats['total_games_played']) = DBSession.\\r
query("avg_rank", "total_kills", "total_deaths", \r
"total_suicides", "total_score", "total_time", "total_held",\r
"total_captures", "total_pickups", "total_drops", \r
"total_returns", "total_collects", "total_destroys", \r
"total_dhk", "total_pushes", "total_pushed", \r
- "total_carrier_frags", "total_alivetime").\\r
+ "total_carrier_frags", "total_alivetime", \r
+ "total_games_played").\\r
from_statement(\r
"select round(avg(rank)) avg_rank, sum(kills) total_kills, "\r
"sum(deaths) total_deaths, sum(suicides) total_suicides, "\r
"sum(destroys) total_destroys, sum(destroys_holding_key) total_dhk, "\r
"sum(pushes) total_pushes, sum(pushed) total_pushed, "\r
"sum(carrier_frags) total_carrier_frags, "\r
- "sum(alivetime) total_alivetime "\r
+ "sum(alivetime) total_alivetime, count(*) total_games_played "\r
"from player_game_stats "\r
"where player_id=:player_id"\r
).params(player_id=player_id).one()\r