query-ac84b42fac4b9eaa023ccb2600726270
Royal Navy ships with wrong country of origin by date
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?date WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
{
SELECT DISTINCT ?item ?date WHERE {
?item wdt:P31/wdt:P279* wd:Q11446.
?item wdt:P137 wd:Q172771.
?item p:P793 ?statement1.
?statement1 (ps:P793/(wdt:P279*)) wd:Q596643.
?statement1 pq:P585 ?date.
FILTER(?date >= "+1801-00-00T00:00:00Z"^^xsd:dateTime)
FILTER(?date < "+1922-00-00T00:00:00Z"^^xsd:dateTime)
?item wdt:P495 wd:Q145.
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?date"):::projected
v2("?item"):::projected
v3("?statement1")
a1((" "))
a2((" "))
c4(["en-gb,en,mul"]):::literal
c14(["wd:Q596643"]):::iri
c2(["bd:serviceParam"]):::iri
c17(["wd:Q145"]):::iri
c9(["wd:Q11446"]):::iri
c11(["wd:Q172771"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
f0[["?date < '+1922-00-00T00:00:00Z^^xsd:dateTime'"]]
f0 --> v1
f1[["?date >= '+1801-00-00T00:00:00Z^^xsd:dateTime'"]]
f1 --> v1
v2 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c9
v2 --"p:direct/P137"--> c11
v2 --"p:P793"--> v3
v3 --"p:statement/P793"--> a2
a2 --"p:direct/P279"--> c14
v3 --"p:qualifier/P585"--> v1
v2 --"p:direct/P495"--> c17