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
Edgars2007
.
"http://com.tv.www./%"
Toggle Highlighting
SQL
#Most thanked editors USE lvwiki_p; SELECT log_title, COUNT(*) FROM logging WHERE log_type="thanks" and log_timestamp between 20150101000000 and 20160101000000 GROUP BY log_title ORDER BY COUNT(*) DESC LIMIT 100; #Most common thanker/thanked unordered pairs USE lvwiki_p; SELECT LEAST(REPLACE(log_title,'_',' '),log_user_text), GREATEST(REPLACE(log_title,'_',' '), log_user_text), COUNT(*) FROM logging WHERE log_type="thanks" and log_timestamp between 20150101000000 and 20160101000000 GROUP BY 1, 2 ORDER BY 3 DESC LIMIT 100; #Most thankful Latvian Wikipedia editors USE lvwiki_p; SELECT log_user_text, COUNT(*) FROM logging WHERE log_type="thanks" and log_timestamp between 20150101000000 and 20160101000000 GROUP BY log_user_text ORDER BY COUNT(*) DESC LIMIT 100; #users with the most edits (article namespace) use lvwiki_p; SELECT concat('[[User:',r.rev_user_text,']]'), COUNT(*) AS num_edits FROM revision r join page p on p.page_id=r.rev_page WHERE p.page_namespace=0 and r.rev_timestamp between 20150101000000 and 20160101000000 GROUP BY r.rev_user_text ORDER BY COUNT(*) DESC LIMIT 150; # dalībnieki pēc izveidotajiem rakstiem use lvwiki_p; SELECT concat('[[User:',r.rev_user_text,']]'), COUNT(*) AS num_articles FROM revision r join page p on p.page_id=r.rev_page WHERE p.page_namespace=0 and p.page_is_redirect=0 and r.rev_timestamp between 20150101000000 and 20160101000000 and r.rev_parent_id=0 GROUP BY r.rev_user_text ORDER BY COUNT(*) DESC LIMIT 100;
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...