query-2c7d917ccc96045944fd7c2c717df4fc
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 ?watercraftClassLabel
WHERE
{
{ ?watercraft wdt:P31 wd:Q1229765 } UNION { ?watercraft wdt:P31 wd:Q11446 } UNION { ?watercraft wdt:P31 wd:Q35872 }
?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")
c4(["wd:Q35872"]):::iri
c7(["bd:serviceParam"]):::iri
c2(["wd:Q1229765"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en,fr,es,it,de,pl"]):::literal
c3(["wd:Q11446"]):::iri
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;
v1 --"wdt:P31"--> c4
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> c2
end
union0r <== or ==> union0l
end
v1 --"wdt:P289"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind0[/"replace(str(?watercraft),'.*Q','Q')"/]
v1 --o bind0
bind0 --as--o v3