query-667aba6e94e4d658181fdf6feda73779
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
(GROUP_CONCAT(DISTINCT ?countryLabel; separator=", ") as ?country_ )
(GROUP_CONCAT(DISTINCT ?coordLabel; separator=", ") as ?coord_ )
(GROUP_CONCAT(DISTINCT ?nameAfterLabel; separator=", ") as ?nameAfter_ )
WHERE
{
?item wdt:P31 wd:Q22746 .
?item wdt:P131 wd:Q490 .
OPTIONAL { ?item wdt:P138 ?nameAfter }
OPTIONAL { ?item wdt:P625 ?coord }
OPTIONAL { ?item wdt:P17 ?country }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,[AUTO_LANGUAGE],en" .
?item rdfs:label ?itemLabel .
?occupation rdfs:label ?occupationLabel .
?coord rdfs:label ?coordLabel .
?country rdfs:label ?countryLabel .
?nameAfter rdfs:label ?nameAfterLabel .
}
}
GROUP BY ?item ?itemLabel
ORDER BY ?prize_date_
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coord")
v9("?coordLabel"):::projected
v13("?coord_")
v5("?country")
v10("?countryLabel"):::projected
v12("?country_")
v2("?item"):::projected
v6("?itemLabel"):::projected
v3("?nameAfter")
v11("?nameAfterLabel"):::projected
v14("?nameAfter_")
v7("?occupation")
v8("?occupationLabel")
v1("?prize_date_")
c11(["it,#91;AUTO_LANGUAGE#93;,en"]):::literal
c9(["bd:serviceParam"]):::iri
c2(["wd:Q22746"]):::iri
c4(["wd:Q490"]):::iri
v2 --"wdt:P31"--> c2
v2 --"wdt:P131"--> c4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P138".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P17".-> v5
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v2 --"rdfs:label"--> v6
v7 --"rdfs:label"--> v8
v4 --"rdfs:label"--> v9
v5 --"rdfs:label"--> v10
v3 --"rdfs:label"--> v11
end
bind3[/"?countryLabel"/]
v10 --o bind3
bind3 --as--o v12
bind4[/"?coordLabel"/]
v9 --o bind4
bind4 --as--o v13
bind5[/"?nameAfterLabel"/]
v11 --o bind5
bind5 --as--o v14