Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Huji
.
Toggle Highlighting
SQL
use fawiki_p; SELECT actor_name, MAX(iwlinks) AS h_index FROM ( SELECT t1.actor_id, t1.iwlinks, SUM(t2.freq) AS total FROM ( SELECT actor_id, iwlinks, COUNT(*) AS freq FROM ( SELECT actor_id, rev_page, COUNT(ll_lang) AS iwlinks FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id JOIN page ON rev_page = page_id AND page_namespace = 0 AND page_is_redirect = 0 JOIN langlinks ON ll_FROM = rev_page WHERE rev_parent_id = 0 AND actor_user <> 0 GROUP BY actor_id, rev_page HAVING COUNT(ll_lang) > 5 ) t GROUP BY actor_id, iwlinks ) t1 JOIN ( SELECT actor_id, iwlinks, COUNT(*) AS freq FROM ( SELECT actor_id, rev_page, COUNT(ll_lang) AS iwlinks FROM revision_userindex JOIN actor_revision ON rev_actor = actor_id JOIN page ON rev_page = page_id AND page_namespace = 0 AND page_is_redirect = 0 JOIN langlinks ON ll_FROM = rev_page WHERE rev_parent_id = 0 AND actor_user <> 0 GROUP BY actor_id, rev_page HAVING COUNT(ll_lang) > 5 ) t GROUP BY actor_id, iwlinks ) t2 ON t2.actor_id = t1.actor_id AND t2.iwlinks >= t1.iwlinks GROUP BY t1.actor_id, t1.iwlinks ) h JOIN actor_revision ar on h.actor_id = ar.actorid LEFT JOIN user_groups ON ug_user = actor_user AND ug_group = "bot" WHERE total >= iwlinks AND ug_user IS NULL GROUP BY h.actor_id ORDER BY h_index DESC
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...