This query is marked as a draft This query has been published by Шиманський Василь.

SQL

AخA
 
SELECT CONCAT('Q', ips.ips_item_id) AS item_id, ips.ips_row_id, COUNT(*) AS links,
  (SELECT COUNT(*) FROM wb_items_per_site ips_bis 
   WHERE ips_bis.ips_site_id = "ukwiki" 
   AND ips_bis.ips_item_id = ips.ips_item_id) AS ukwiki,
   (SELECT ips_site_page FROM wb_items_per_site ips_en WHERE ips_en.ips_item_id = ips.ips_item_id AND ips_en.ips_site_id = "huwiki" LIMIT 1) AS page_title,
   (SELECT COUNT(*) FROM wb_items_per_site ips_bis 
   WHERE ips_bis.ips_site_id = "huwiki" 
   AND ips_bis.ips_item_id = ips.ips_item_id
   AND ips_bis.ips_site_page NOT REGEXP '^(Category|Template|Module|MediaWiki|Help|Portal|Wikipedia)') AS enwiki
FROM wb_items_per_site ips
WHERE ips.ips_site_id LIKE '%wiki'
GROUP BY ips.ips_item_id
HAVING ukwiki < 1 AND enwiki > 0
ORDER BY links DESC 
LIMIT 20000;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...