query-26858225e0bc891d3bc5e0a63641fa11
TODO
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 ?watercraft (REPLACE(STR(?watercraft),".*Q","Q") AS ?watercraftQid) ?watercraftLabel
WHERE
{
{ ?watercraft wdt:P31 wd:Q1229765 } UNION { ?watercraft wdt:P31 wd:Q11446 } UNION { ?watercraft wdt:P31 wd:Q2811 } UNION { ?watercraft wdt:P31 wd:Q35872 }
FILTER NOT EXISTS { ?watercraft wdt:P289 ?watercraftClass . }
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr,es,it,de,pl".}
}
LIMIT 5000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?watercraft"):::projected
v2("?watercraftClass")
v3("?watercraftQid")
c5(["wd:Q2811"]):::iri
c6(["wd:Q35872"]):::iri
c8(["bd:serviceParam"]):::iri
c3(["wd:Q1229765"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en,fr,es,it,de,pl"]):::literal
c4(["wd:Q11446"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P289"--> e0v2
e0v1("?watercraft"):::projected
e0v2("?watercraftClass"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P289"--> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c6
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c5
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c4
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"replace(str(?watercraft),'.*Q','Q')"/]
v1 --o bind1
bind1 --as--o v3