query-718e939d30c1f13f1e60e990c15b7501
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?bn (GROUP_CONCAT(DISTINCT(?it); separator="/") as ?it) {
?item wdt:P31 wd:Q6256 .
OPTIONAL {
?item p:P1549 ?bn_statement .
?bn_statement ps:P1549 ?bn .
FILTER( LANG( ?bn ) = 'bn' ) .
}
OPTIONAL {
?item p:P1549 ?it_statement .
?it_statement ps:P1549 ?it .
FILTER( LANG( ?it ) = 'it' ) .
} .
}
GROUP BY ?item ?itemLabel ?bn
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?bn"):::projected
v4("?bn_statement")
v6("?it"):::projected
v5("?it_statement")
v3("?item"):::projected
c4(["wd:Q6256"]):::iri
v3 --"p:direct/P31"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P1549".-> v4
v4 --"p:statement/P1549"--> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P1549".-> v5
v5 --"p:statement/P1549"--> v6
end
bind1[/"?it"/]
v6 --o bind1
bind1 --as--o v6