Beria, Andre,
It does, but not exactly that URL. Try this one:
http://toolserver.org/~ntavares/patrimonio/api/api.php?action=statisticsct&a...
The column n_wlm_ids is the value Andre is seeking for.
Andre, the limitation you ran across was (one of) why ranking.php shouldn't be used.. I found 2 solutions:
1) going through revisions to extract the user of the *first* revision in an image - this is very very heavy, it was implemented and optimized by means of TEMPORARY tables, I still might have the code somewhere;
2) In the end I came up with the following: keep the search base limited and simple as possible (which lets me optimize it my way, instead of relying in inefficient 'commons' VIEWs), which is the statisticsct table. The, the api module 'statistictsct&ctscope=user' will just have to do the second query.
Note that, in the second query, the JOIN is just to get a traversal "user participation" (that is to say, "in all countries").
$sql = 'SELECT /* SLOW_OK */ img_name , rev_user AS img_user_id , rev_user_text AS img_user_name , page_id AS img_page_id , "'.$country.'" AS img_wlm_country , TRIM(SUBSTR(c2.cl_sortkey, 1, INSTR(c2.cl_sortkey, "\n")-1)) AS img_wlm_id , rev_timestamp AS img_timestamp , IF (user_registration IS NULL,20051222000000,user_registration) AS user_first_rev /* there is no user_registration for users older than this */ , IF (c3.cl_to IS NULL,0,1) AS img_is_valid FROM image JOIN page ON page_namespace = 6 AND page_title = img_name JOIN categorylinks c1 ON page_id = c1.cl_from AND c1.cl_to = "Images_from_Wiki_Loves_Monuments_2011_in_'.$country.'" LEFT JOIN categorylinks c2 ON c1.cl_from = c2.cl_from AND c2.cl_to = "'.$category.'" /* not all have */ JOIN revision ON rev_page = page_id AND rev_parent_id = 0 JOIN user ON user_id = rev_user LEFT JOIN categorylinks c3 ON c3.cl_from = page_id and c3.cl_to = "Reviewed_images_from_Wiki_Loves_Monuments_2011_in_'.$country.'" ';
$sql = 'SELECT st1.img_user_name AS user , COUNT(DISTINCT st1.img_name) AS n_images , SUM(img_is_valid) AS n_images_accepted , GROUP_CONCAT(DISTINCT st1.img_name SEPARATOR "[,]") AS images , COUNT(DISTINCT st1.img_wlm_id) AS n_wlm_ids , GROUP_CONCAT(DISTINCT st1.img_wlm_id SEPARATOR "[,]") AS wlm_ids , st2.n_countries AS n_countries , st2.countries AS countries , st2.n_images_all AS n_images_all , st2.images_all AS images_all , st2.n_wlm_ids_all AS n_wlm_ids_all , st2.wlm_ids_all AS wlm_ids_all , st2.n_images_accepted_all , IF(st1.user_first_rev<20110831230000,0,1) AS user_is_new FROM statisticsct2 st1 JOIN ( SELECT img_user_name , COUNT(DISTINCT img_wlm_country) AS n_countries , GROUP_CONCAT(DISTINCT img_wlm_country SEPARATOR "[,]") AS countries , COUNT(DISTINCT img_name) AS n_images_all , GROUP_CONCAT(DISTINCT img_name SEPARATOR "[,]") AS images_all , COUNT(DISTINCT img_wlm_id) AS n_wlm_ids_all , GROUP_CONCAT(DISTINCT img_wlm_id SEPARATOR "[,]") AS wlm_ids_all , SUM(img_is_valid) AS n_images_accepted_all FROM statisticsct2 GROUP BY img_user_name) st2 ON st1.img_user_name = st2.img_user_name WHERE st1.img_wlm_country IN ( '.$countries.' ) GROUP BY st1.img_user_name';