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
.
use wikidatawiki_p; SELECT page_title,(SELECT count(*) FROM wb_items_per_site WHERE ips_item_id=substr(page_title,2)*1) AS sitelink_count FROM page WHERE page_namespace=0 AND NOT EXISTS (SELECT * FROM wb_items_per_site WHERE ips_item_id=substr(page_title,2)*1 AND ips_site_id='lvwiki' LIMIT 1) AND page_title IN ("Q4811246") GROUP BY page_title -------------- use enwiki_p; SELECT DISTINCT p.page_id,p.page_title,p.page_namespace,p.page_touched,p.page_len from page p where p.page_namespace IN(0) AND p.page_is_redirect=0 and exists (SELECT * FROM templatelinks,page pt WHERE MOD(p.page_namespace,2)=0 AND pt.page_title=p.page_title AND pt.page_namespace=p.page_namespace+1 AND tl_from=pt.page_id AND tl_namespace=10 AND tl_title = "WikiProject_Belarus") -------------------- šis ir ļoti ok - 20 sekundes Baltkrievijai use enwiki_p; SELECT count(l.ll_lang) as langs, ll_from from langlinks l join page p on p.page_id=l.ll_from #DISTINCT p.page_id,p.page_title,p.page_namespace,p.page_touched,p.page_len #from page p where p.page_namespace IN(0) AND p.page_is_redirect=0 and not exists (select * from langlinks m where m.ll_from=l.ll_from and m.ll_lang="lv") and exists (SELECT * FROM templatelinks,page pt WHERE MOD(p.page_namespace,2)=0 AND pt.page_title=p.page_title AND pt.page_namespace=p.page_namespace+1 AND tl_from=pt.page_id AND tl_namespace=10 AND tl_title = "WikiProject_Belarus") group by l.ll_from order by count(l.ll_lang) desc
Toggle Highlighting
SQL
use enwiki_p; SELECT count(l.ll_lang) as langs, ll_from from langlinks l join page p on p.page_id=l.ll_from #DISTINCT p.page_id,p.page_title,p.page_namespace,p.page_touched,p.page_len #from page p where p.page_namespace IN(0) AND p.page_is_redirect=0 and not exists (select * from langlinks m where m.ll_from=l.ll_from and m.ll_lang="lv") and exists (SELECT * FROM templatelinks,page pt WHERE MOD(p.page_namespace,2)=0 AND pt.page_title=p.page_title AND pt.page_namespace=p.page_namespace+1 AND tl_from=pt.page_id AND tl_namespace=10 AND tl_title = "WikiProject_Belarus") group by l.ll_from order by count(l.ll_lang) 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...