8 my $id = $cgi->param('id');
10 my $dbh = ccbs::db_connect();
12 my $players = ccbs::db_fetch_all($dbh, 'SELECT scores.player,nick,countryname,clubname,count(*) AS num_songs,COUNT(DISTINCT song) AS num_unique_songs,COUNT(DISTINCT tournament) AS num_tournaments,AVG(score)::integer AS avg_score,MAX(score) AS high_score FROM scores NATURAL JOIN tournaments JOIN players ON scores.player=players.player JOIN countries ON players.country=countries.country NATURAL LEFT JOIN clubs WHERE scoringsystem=1 GROUP BY scores.player,nick,countryname,clubname ORDER BY LOWER(nick)');
15 ccbs::process_template('players.tmpl', _('Players'), {