Skip to content

Commit 88470b6

Browse files
committed
fixed sql query to remove duplicates
1 parent 288f68c commit 88470b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_scripts/get_edit_count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
data = simplejson.load(urllib.urlopen(url))
6868
page_id = data["query"]["pages"].keys()[0]
6969
if page_id != -1:
70-
query = """SELECT COUNT(*) AS total_edits,
70+
query = """SELECT COUNT(DISTINCT rev_id) AS total_edits,
7171
COUNT(DISTINCT rev_user) AS unique_editors
7272
FROM revision, user, user_groups
7373
WHERE rev_page=%s AND

0 commit comments

Comments
 (0)