query-e4c7a42cadd2771c26aa90158baa05b2
Military mattersI've fixed weapons and military vehicles, of which there are very few physical objects, and had a good go at aircraft, though someone has added 3000 odd individual aircraft, which I can't face fixing. I use this query to spot them, as I guessed anything with a location or serial number was an object aircraft that aren't in particular places or collections, or have serial numbers, so are probably aircraft models
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?instanceLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
{
SELECT DISTINCT ?item ?instance WHERE {
?item wdt:P31/wdt:P279* wd:Q216916.
?item wdt:P31 ?instance.
?item wdt:P31/wdt:P279* wd:Q11436.
MINUS {?item wdt:P276 ?location}
MINUS {?item wdt:P131 ?loc1}
MINUS {?item wdt:P426 ?reg}
MINUS {?item wdt:P195 ?collection}
MINUS {?item wdt:P625 ?loc2}
MINUS {?item wdt:P2598 ?serial}
MINUS {?item wdt:P576 ?destroyed}
}
}
}
Query found at
- https://www.wikidata.org/wiki/User_talk:Peter_F._Patel-Schneider
- https://www.wikidata.org/wiki/Wikidata:Requests_for_comment/object_vs_design_class_vs_functional_class_for_manufactured_objects/Queries
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?collection")
v9("?destroyed")
v2("?instance")
v1("?item"):::projected
v4("?loc1")
v7("?loc2")
v3("?location")
v5("?reg")
v8("?serial")
a1((" "))
a2((" "))
c7(["wd:Q216916"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;"]):::literal
c8(["wd:Q11436"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
v1 --"wdt:P31"--> v2
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c8
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P276"--> v3
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P131"--> v4
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P426"--> v5
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P195"--> v6
end
subgraph minus4["MINUS"]
style minus4 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P625"--> v7
end
subgraph minus5["MINUS"]
style minus5 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P2598"--> v8
end
subgraph minus6["MINUS"]
style minus6 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P576"--> v9
end