This commit is contained in:
2025-05-21 11:35:02 +02:00
parent bf8815d621
commit 98cc1a578b
2 changed files with 7 additions and 4 deletions

View File

@@ -19,4 +19,7 @@ create table if not exists similar_pairs (
cutoff_date TEXT NOT NULL,
last_updated TEXT not null default (datetime('now')),
primary key (name1, name2)
);
);
create index if not exists idx_similar_pairs_name1 on similar_pairs(name1);
create index if not exists idx_similar_pairs_name2 on similar_pairs(name2);

View File

@@ -12,8 +12,8 @@ with RECURSIVE connected_players as (
matching_count,
total_achievements2,
similarity_percentage
from similar_pairs
ity_percentage >= 70
from similar_pairs
where similarity_percentage >= 70
union
select case
when sp.name1 = cp.player_name then sp.name2
@@ -45,7 +45,7 @@ select group_root,
MIN(matching_count) as min_matching,
AVG(matching_count) as avg_matching
from connected_players
where group_root in ('')
where group_root in ('Paskoo')
group by group_root
having count(*) > 1
order by count(*) desc,