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
MSUGRA
.
Toggle Highlighting
SQL
# 1. 'redirects' leading to "United_States" # alt: 'pagelinks' leading to "United_States" JOIN 'page.is_redirect' # Compare speed and resultset! # 2. Count in 'pagelinks' the titles from resultset #1 # 3. Create a sum of count field from #2 SELECT pl_title AS title, COUNT(1) as refcount FROM pagelinks WHERE pl_namespace = 0 AND pl_from_namespace = 0 AND ( pl_title = "United_States" OR pl_title = "'merica" OR pl_title = "'murica" ) GROUP BY title #SELECT # t_ # ,r.refs #from foo as t #left join ( # select # title # ,count(*) as refs # from foo #) as r #on t.title = r.title;
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...