query-c4461dfeeb39175d00a64748dcd582d4
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT
?item ?itemLabel
(MIN(YEAR(?prize_date)) as ?prize_date_ )
(GROUP_CONCAT(DISTINCT ?countryLabel; separator=", ") as ?country_ )
(GROUP_CONCAT(DISTINCT ?occupationLabel; separator=", ") as ?Role_ )
# (GROUP_CONCAT(DISTINCT ?awardReceivedLabel; separator=", ") as ?otherAwardsReceived_ )
(GROUP_CONCAT(DISTINCT ?VIAFLabel; separator=", ") as ?VIAF_ )
WHERE
{
BIND( wd:Q260117 as ?prizeID )
?item wdt:P166 ?prizeID.
OPTIONAL { ?item p:P166 ?premio . ?premio pq:P585 ?prize_date ; ps:P166 ?prizeID }
OPTIONAL { ?item wdt:P413 ?occupation }
OPTIONAL { ?item wdt:P166 ?awardReceived }
OPTIONAL { ?item wdt:P214 ?VIAF }
OPTIONAL { ?item wdt:P27 ?country }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,[AUTO_LANGUAGE],en" .
?item rdfs:label ?itemLabel .
?occupation rdfs:label ?occupationLabel .
?awardReceived rdfs:label ?awardReceivedLabel .
?country rdfs:label ?countryLabel .
?VIAF rdfs:label ?VIAFLabel .
}
}
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;
v16("?Role_")
v8("?VIAF")
v14("?VIAFLabel"):::projected
v17("?VIAF_")
v7("?awardReceived")
v12("?awardReceivedLabel")
v9("?country")
v13("?countryLabel"):::projected
v15("?country_")
v3("?item"):::projected
v10("?itemLabel"):::projected
v6("?occupation")
v11("?occupationLabel"):::projected
v4("?premio")
v2("?prizeID")
v5("?prize_date"):::projected
v15("?prize_date_")
c11(["it,#91;AUTO_LANGUAGE#93;,en"]):::literal
c9(["bd:serviceParam"]):::iri
bind0[/"'wd:Q260117'"/]
bind0 --as--o v2
v3 --"p:direct/P166"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:P166".-> v4
v4 --"p:qualifier/P585"--> v5
v4 --"p:statement/P166"--> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P413".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P166".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P214".-> v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P27".-> v9
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
v3 --"rdfs:label"--> v10
v6 --"rdfs:label"--> v11
v7 --"rdfs:label"--> v12
v9 --"rdfs:label"--> v13
v8 --"rdfs:label"--> v14
end
bind5[/"min(year-from-dateTime(?prize_date))"/]
v5 --o bind5
bind5 --as--o v15
bind6[/"?countryLabel"/]
v13 --o bind6
bind6 --as--o v15
bind7[/"?occupationLabel"/]
v11 --o bind7
bind7 --as--o v16
bind8[/"?VIAFLabel"/]
v14 --o bind8
bind8 --as--o v17