[Bug 59310] DBQ-55 the query of count the number of edit

2014-01-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=59310

Bugzilla Bug Importer (valhallasw)  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Bugzilla Bug Importer (valhallasw) 
 ---

This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: (none)
CC list:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 59310] DBQ-55 the query of count the number of edit

2014-01-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=59310

--- Comment #3 from Bugzilla Bug Importer (valhallasw) 
 ---
---
From: Lars Age Kamfjord 
Date: Thu, 19 Feb 2009 17:09:09
---

I've run the query and put it on http://toolserver.org/~laaknor/SQL/DBQ-55.txt

It's rather large, so I hope it helps ![][1]

   [1]: https://jira.toolserver.org/images/icons/emoticons/wink.gif

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 59310] DBQ-55 the query of count the number of edit

2014-01-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=59310

--- Comment #2 from Bugzilla Bug Importer (valhallasw) 
 ---
---
From: zeyi He 
Date: Wed, 18 Feb 2009 14:43:17
---

Hi, Thanks!

I think first one is what i need. but only i have is revision table and page
table. I don't have user table in my own database server. so this query can't
work.

can i use rev_user in revision table to instead of user_id in user table?
thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 59310] DBQ-55 the query of count the number of edit

2014-01-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=59310

--- Comment #1 from Bugzilla Bug Importer (valhallasw) 
 ---
---
From: Lars Age Kamfjord 
Date: Tue, 10 Feb 2009 21:05:23
---

Not sure what you want here. Do you want just a query with year and total
number of edits of all users this year, or username, year and users number of
edits?

Username,total edits, year will be this query:  
SELECT u.user_name,COUNT![][1] AS amount,LEFT(rev_timestamp,4) AS year FROM
revision r JOIN user u ON u.user_id=rev_user WHERE u.user_name = 'Laaknor'
GROUP BY LEFT(rev_timestamp,4),u.user_name;

(just take out "WHERE u.user_name = 'Laaknor' to get all users

Or if you wish to have just the total amount of edits group by year, it's much
easier:  
SELECT COUNT![][1] AS amount,LEFT(rev_timestamp,4) FROM revision GROUP BY
LEFT(rev_timestamp,4);

Does this help?

Edit: Bah, replace ![][1] with ( and * and )

   [1]: https://jira.toolserver.org/images/icons/emoticons/star_yellow.gif

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l