query-f7dbc742db95e8d3516ca605280d6585
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 DISTINCT ?itemLabel ?item ?itemDescription ?extra WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-GB,en". }
{ SELECT DISTINCT ?item (GROUP_CONCAT(DISTINCT ?extralist; SEPARATOR = "#") AS ?extra) WHERE {
VALUES ?item {wd:Q7534755}. # Sketchfab
?item wikibase:statements ?statements.
OPTIONAL {
{?item wdt:P17 ?extra} # country
?extra rdfs:label ?extralist. FILTER (LANG(?extralist) = "en")
}
}
GROUP BY ?item
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?extra"):::projected
v1("?extralist")
v2("?item"):::projected
v3("?statements")
c2(["bd:serviceParam"]):::iri
c4(["en-GB,en"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
bind0[/VALUES ?item/]
bind0-->v2
bind00(["wd:Q7534755"])
bind00 --> bind0
v2 --"wikibase:statements"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v5
v5 --"rdfs:label"--> v1
end
bind2[/"?extralist"/]
v1 --o bind2
bind2 --as--o v5