tournament table games: optimize queries