HASH 91769f42fc2b
DATE 2025-12-28
SUBJECT ookstats: seasonal scoped player realm best runs
FILES 1 CHANGED
HASH 91769f42fc2b
DATE 2025-12-28
SUBJECT ookstats: seasonal scoped player realm
best runs
FILES 1 CHANGED
┌─ nix/pkgs/ookstats/src/internal/pipeline/process.go ───────────────────────┐
│ diff --git a/nix/pkgs/ookstats/src/internal/pipeline/process.go b/nix/pkgs/ookstat │
│ s/src/internal/pipeline/process.go │
│ index b3feee8..2db462c 100644 │
│ --- a/nix/pkgs/ookstats/src/internal/pipeline/process.go │
│ +++ b/nix/pkgs/ookstats/src/internal/pipeline/process.go │
│ @@ -582,8 +582,8 @@ func computePlayerRankings(tx *sql.Tx) (int, error) { │
│ pp.realm_ranking, │
│ pp.combined_best_time, │
│ COALESCE(parent_r.id, r.id) as pool_id, │
│ - MIN(pp.combined_best_time) OVER (PARTITION BY COALESCE(parent_r.id, r.id)) a │
│ s pool_min_time, │
│ - COUNT(*) OVER (PARTITION BY COALESCE(parent_r.id, r.id)) as pool_total │
│ + MIN(pp.combined_best_time) OVER (PARTITION BY pp.season_id, COALESCE(parent_ │
│ r.id, r.id)) as pool_min_time, │
│ + COUNT(*) OVER (PARTITION BY pp.season_id, COALESCE(parent_r.id, r.id)) as po │
│ ol_total │
│ FROM player_profiles pp │
│ JOIN realms r ON pp.realm_id = r.id │
│ LEFT JOIN realms parent_r ON r.parent_realm_slug = parent_r.slug AND r.region │
│ = parent_r.region │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ .../internal/pipeline/process.go ───┐
│ diff --git a/nix/pkgs/ookstats/src/internal/ │
│ pipeline/process.go b/nix/pkgs/ookstats/src/ │
│ internal/pipeline/process.go │
│ index b3feee8..2db462c 100644 │
│ --- a/nix/pkgs/ookstats/src/internal/pipelin │
│ e/process.go │
│ +++ b/nix/pkgs/ookstats/src/internal/pipelin │
│ e/process.go │
│ @@ -582,8 +582,8 @@ func computePlayerRankin │
│ gs(tx *sql.Tx) (int, error) { │
│ pp.realm_ranking, │
│ pp.combined_best_time, │
│ COALESCE(parent_r.id, r.id) as pool_id │
│ , │
│ - MIN(pp.combined_best_time) OVER (PARTI │
│ TION BY COALESCE(parent_r.id, r.id)) as pool │
│ _min_time, │
│ - COUNT(*) OVER (PARTITION BY COALESCE(p │
│ arent_r.id, r.id)) as pool_total │
│ + MIN(pp.combined_best_time) OVER (PARTI │
│ TION BY pp.season_id, COALESCE(parent_r.id, │
│ r.id)) as pool_min_time, │
│ + COUNT(*) OVER (PARTITION BY pp.season_ │
│ id, COALESCE(parent_r.id, r.id)) as pool_tot │
│ al │
│ FROM player_profiles pp │
│ JOIN realms r ON pp.realm_id = r.id │
│ LEFT JOIN realms parent_r ON r.parent_r │
│ ealm_slug = parent_r.slug AND r.region = par │
│ ent_r.region │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET