query-61248e3339d705ede3d8ed1ffd27fa82
: I am entirely sure what you mean. I don't think that there are any disambig pages on enwiki for only cities, towns, villages etc in the USA. This code gives some disambig pages on enwiki minus on cywiki. I sat a limit to 1000 pages. A query without a limit will timeout. Llywelyn2000@
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?en_wikipedia ?l_wikidata
{
?item wdt:P882 ?fips .
[] schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> ; schema:name ?en_wikipedia .
MINUS { ?page_cy schema:about ?item ; schema:isPartOf <https://cy.wikipedia.org/> }
?item rdfs:label ?l_wikidata .
FILTER (
lang(?l_wikidata) = "en"
&& ?en_wikipedia != ?l_wikidata
)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?en_wikipedia"):::projected
v4("?fips")
v3("?item"):::projected
v1("?l_wikidata"):::projected
v5("?page_cy")
a1((" "))
c7([https://cy.wikipedia.org/]):::iri
c5([https://en.wikipedia.org/]):::iri
f0[["?l_wikidata = 'en'?en_wikipedia != ?l_wikidata"]]
f0 --> v1
f0 --> v2
v3 --"wdt:P882"--> v4
a1 --"schema:about"--> v3
a1 --"schema:isPartOf"--> c5
a1 --"schema:name"--> v2
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v5 --"schema:about"--> v3
v5 --"schema:isPartOf"--> c7
end
v3 --"rdfs:label"--> v1