https://bugzilla.wikimedia.org/show_bug.cgi?id=59374
--- Comment #5 from Bugzilla Bug Importer (valhallasw) <wmf.bugconver...@gmail.com> --- ------------------------------------------------------------------------------- From: Hoo man <h...@online.de> Date: Fri, 28 Jan 2011 22:45:37 ------------------------------------------------------------------------------- Both done ![][1] SQL: (first query) SELECT COUNT(*) as links, page.page_title as page FROM langlinks INNER JOIN page on langlinks.ll_from = page.page_id WHERE page.page_namespace = 0 GROUP BY langlinks.ll_from HAVING links > 20 ORDER BY links DESC; (second query) This one was a bit more complicated, I first had to pull the page list from enwiki_p in a user table, then dump that user table and import it to the server with ptwiki_p on. (MySQL doesn't support JOINS between different Servers yet) This is the SELECT INSERT into the user table: INSERT INTO u_hoo.dbq121 SELECT langlinks.ll_title FROM (SELECT * FROM langlinks INNER JOIN page on langlinks.ll_from = page.page_id WHERE page.page_namespace = 0 GROUP BY ll_from ORDER BY COUNT(*) DESC LIMIT 5000) as langlinks INNER JOIN page ON langlinks.ll_from = page.page_id LEFT JOIN (SELECT COUNT(*) as bool, ll_from FROM langlinks WHERE ll_lang = 'pt' GROUP BY ll_from) as tmp ON tmp.ll_from = langlinks.ll_from WHERE tmp.bool IS NOT NULL; After the dump and import to sql 2: SELECT page.page_len as page_size, dbq121.page_title as page FROM u_hoo.dbq121 INNER JOIN page ON dbq121.page_title = page.page_title WHERE page.page_len < 3072 AND page.page_namespace = 0 ORDER BY page.page_len DESC; Results: http://toolserver.org/~hoo/dbq/dbq-121_4.txt (first query) http://toolserver.org/~hoo/dbq/dbq-121_5.txt (second query) [1]: https://jira.toolserver.org/images/icons/emoticons/smile.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