SELECT stats.uuid AS player, hist.uuid AS opponent, SUM(CASE WHEN hist.result ="won" THEN 1 ELSE 0 END) AS wins, SUM(CASE WHEN hist.result ="lost" THEN 1 ELSE 0 END) AS lossesFROM jungleville_stats ASstats USE KEYS "zid-jungle-stats-0004"UNNEST stats.`pvp-hist`AS histGROUP BY stats.uuid, hist.uuid