query-0639f2026321004026dd969cf0f1fa71
examle with selected minerals
SELECT ?sg ?sgLabel ?sgImage ?group ?groupLabel ?groupDescription ?item ?itemLabel ?itemDescription ?itemImage
WHERE {
VALUES ?item {wd:Q108147097 wd:Q1117109 wd:Q114584875 wd:Q13292920 wd:Q13322207 wd:Q1614643 wd:Q1656448 wd:Q19810681}
?item wdt:P279 ?group.
?group wdt:P279 ?sg.
OPTIONAL {?item wdt:P18 ?itemImage.}
OPTIONAL {?group wdt:P18 ?groupImage.}
OPTIONAL {?sg wdt:P18 ?sgImage.}
SERVICE wikibase:label{ bd:serviceParam wikibase:language "sr". }
}
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#>
# examle with selected minerals
SELECT ?sg ?sgLabel ?sgImage ?group ?groupLabel ?groupDescription ?item ?itemLabel ?itemDescription ?itemImage
WHERE {
VALUES ?item {wd:Q108147097 wd:Q1117109 wd:Q114584875 wd:Q13292920 wd:Q13322207 wd:Q1614643 wd:Q1656448 wd:Q19810681}
?item wdt:P279 ?group.
?group wdt:P279 ?sg.
OPTIONAL {?item wdt:P18 ?itemImage.}
OPTIONAL {?group wdt:P18 ?groupImage.}
OPTIONAL {?sg wdt:P18 ?sgImage.}
SERVICE wikibase:label{ bd:serviceParam wikibase:language "sr". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?group"):::projected
v5("?groupImage")
v1("?item"):::projected
v4("?itemImage"):::projected
v3("?sg"):::projected
v6("?sgImage"):::projected
c4(["bd:serviceParam"]):::iri
c6(["sr"]):::literal
bind0[/VALUES ?item/]
bind0-->v1
bind00(["wd:Q108147097"])
bind00 --> bind0
bind01(["wd:Q1117109"])
bind01 --> bind0
bind02(["wd:Q114584875"])
bind02 --> bind0
bind03(["wd:Q13292920"])
bind03 --> bind0
bind04(["wd:Q13322207"])
bind04 --> bind0
bind05(["wd:Q1614643"])
bind05 --> bind0
bind06(["wd:Q1656448"])
bind06 --> bind0
bind07(["wd:Q19810681"])
bind07 --> bind0
v1 --"wdt:P279"--> v2
v2 --"wdt:P279"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v5
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end