Sheng Jiong wrote:
Hi, everybody. Some sysops in Chinese Wikipedia want to
know how to check the number of artiles that are *edited* in a *day* through sql query.
Anyone has any idea?
SELECT COUNT(DISTINCT rc_title) FROM recentchanges
WHERE rc_namespace=0 AND rc_timestamp LIKE '20030623%'
Change '20030623' to the desired date you want to check; note that the
recentchanges tables usually only stores the last few days' worth
(recent, no? ;)
If you want to also count non-article pages, change to:
SELECT COUNT(DISTINCT rc_namespace,rc_title) FROM recentchanges
WHERE rc_timestamp LIKE '20030623%'
It should be possible to rig it up to check exactly the last 24 hours or
whatever, but since we don't use the standard date/time column type it's
a little tricky to do ad-hoc.
-- brion vibber (brion @ pobox.com