Skip to content

Commit 1fee6c4

Browse files
committed
fix query
1 parent 8ee3135 commit 1fee6c4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

tasks/users_this_week/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
FROM user_groups
2020
INNER JOIN user ON user_id = ug_user
2121
WHERE ug_group = "bot")
22-
and actor_name not in (SELECT replace(pl_title,"_"," ")
23-
FROM pagelinks
24-
where pagelinks.pl_from = 7352181
25-
and pl_namespace = 2)
22+
and actor_name not in (SELECT replace(lt_title, "_", " ")
23+
FROM pagelinks
24+
inner join linktarget ON lt_id = pl_target_id
25+
WHERE pagelinks.pl_from = 7352181
26+
AND lt_namespace = 2)
2627
GROUP BY actor_name
2728
having COUNT(*) > 1
2829
ORDER BY score DESC,name

tasks/users_this_week/data.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@
3232
FROM user_groups
3333
INNER JOIN user ON user_id = ug_user
3434
WHERE ug_group = "bot")
35-
and actor_name not in (SELECT replace(pl_title,"_"," ")
36-
FROM pagelinks
37-
where pagelinks.pl_from = 7352181
38-
and pl_namespace = 2)
35+
and actor_name not in (SELECT replace(lt_title, "_", " ")
36+
FROM pagelinks
37+
inner join linktarget ON lt_id = pl_target_id
38+
WHERE pagelinks.pl_from = 7352181
39+
AND lt_namespace = 2)
3940
GROUP BY actor_name
4041
having COUNT(*) > 1
4142
ORDER BY score DESC,name

0 commit comments

Comments
 (0)