query-443693cef6437dce7b979f91ee6dfa6e
list all items with P238 or P239 but no article in enwp SELECT DISTINCT ?airport ?airportLabel WHERE { VALUES ?prop { wdt:P238 wdt:P239 } { ?airport ?prop [] . } MINUS { ?article schema:about ?airport; schema:isPartOf https://en.wikipedia.org/ . } SERVICE wikibase:label { bd:serviceParam wikibase:language "en,ms,de,hu,zh,lv,fi,id,ru,es,fr,da,pt,pl,it,sv". } } ORDER BY ?airportLabel
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# list all items with P238 or P239 but no article in enwp
SELECT DISTINCT ?airport ?airportLabel WHERE
{
VALUES ?prop { wdt:P238 wdt:P239 }
{
?airport ?prop [] .
}
MINUS
{
?article schema:about ?airport;
schema:isPartOf <https://en.wikipedia.org/> .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,ms,de,hu,zh,lv,fi,id,ru,es,fr,da,pt,pl,it,sv". }
}
ORDER BY ?airportLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?airport"):::projected
v1("?airportLabel"):::projected
v4("?article")
v2("?prop")
a1((" "))
c3([https://en.wikipedia.org/]):::iri
c5(["bd:serviceParam"]):::iri
c7(["en,ms,de,hu,zh,lv,fi,id,ru,es,fr,da,pt,pl,it,sv"]):::literal
bind0[/VALUES ?prop/]
bind0-->v2
bind00(["wdt:P238"])
bind00 --> bind0
bind01(["wdt:P239"])
bind01 --> bind0
v3 -->v2--> a1
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v4 --"schema:about"--> v3
v4 --"schema:isPartOf"--> c3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end