query-5aba0e8103a9efe28cdb525df2ac7eda
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?item
?itemLabel
?image
(GROUP_CONCAT(DISTINCT ?usedDataset; SEPARATOR = " | ") AS ?usedDatasetIds)
(GROUP_CONCAT(DISTINCT ?usedDatasetLabel; SEPARATOR = " | ") AS ?usedDatasetLabels)
WHERE {
?item wdt:P9883 wd:Q110553382.
OPTIONAL { ?item wdt:P18 ?image. }
OPTIONAL { ?item wdt:P973 ?describedAtUrl. }
OPTIONAL { ?item wdt:P2283 ?usedDataset. }
SERVICE wikibase:label {
bd:serviceParam wikibase:language "de,en".
?item rdfs:label ?itemLabel.
?usedDataset rdfs:label ?usedDatasetLabel.
}
}
GROUP BY ?item ?itemLabel ?image
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?describedAtUrl")
v2("?image"):::projected
v1("?item"):::projected
v5("?itemLabel"):::projected
v4("?usedDataset"):::projected
v7("?usedDatasetIds")
v6("?usedDatasetLabel"):::projected
v8("?usedDatasetLabels")
c7(["bd:serviceParam"]):::iri
c9(["de,en"]):::literal
c2(["wd:Q110553382"]):::iri
v1 --"wdt:P9883"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P973".-> v3
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P2283".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
v1 --"rdfs:label"--> v5
v4 --"rdfs:label"--> v6
end
bind2[/"?usedDataset"/]
v4 --o bind2
bind2 --as--o v7
bind3[/"?usedDatasetLabel"/]
v6 --o bind3
bind3 --as--o v8