+
+/* number of solos */
+$result = DB_query_array_all("SELECT type,COUNT(*) as c from Game".
+ " WHERE status='gameover'".
+ " GROUP BY type".
+ " ORDER BY c DESC");
+array_unshift($result,array("Type","Frequency"));
+echo output_table($result,"Game types","stats");
+
+/* break up solos in types */
+$result = DB_query_array_all("SELECT solo,COUNT(*) as c from Game".
+ " WHERE status='gameover'".
+ " AND type='solo'".
+ " GROUP BY solo".
+ " ORDER BY c DESC");
+array_unshift($result,array("Type","Frequency"));
+echo output_table($result,"Kind of solos","stats");
+
+/*
+ 2 top user mit maximaler quote an solo (min 10 games)
+
+ top scoring game: winning players
+
+ game with the same cards: show 3 at random:
+ player who won, points, what kind of game
+ select g1.id, g2.id from game g1 left join game g2 on g1.randomnumbers=g2.randomnumbers where g1.id<g2.id order by g1.id
+ select id from game where randomnumbers like "blablabl%"; the % is like .* in regexp
+ select id,type,solo,status from game where id in (select id from game where randomnumbers in (select randomnumbers from game where id=27));
+
+*/
+$result = DB_query_array_all("SELECT fullname,COUNT(*) as c FROM Score".
+ " LEFT JOIN User ON User.id=winner_id" .
+ " WHERE score IN ('fox','doko','karlchen')".
+ " GROUP BY game_id,fullname".
+ " ORDER BY c DESC LIMIT 3" );
+array_unshift($result,array("Name","Points"));
+echo output_table($result,"Most extra points in a single game","stats");
+