query-6303a4c66858ec2bb35cda1d1971ea55
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 ?Occupation_ )
(GROUP_CONCAT(DISTINCT ?eventoLabel; separator=", ") as ?event_ )
(GROUP_CONCAT(DISTINCT ?awardReceivedLabel; separator=", ") as ?otherAwardsReceived_ )
(GROUP_CONCAT(DISTINCT ?VIAFLabel; separator=", ") as ?VIAF_ )
WHERE
{
BIND( wd:Q48786 as ?prizeID )
?item wdt:P166 ?prizeID.
OPTIONAL { ?item p:P166 ?premio . ?premio pq:P585 ?prize_date ; ps:P166 ?prizeID }
OPTIONAL { ?item wdt:P793 ?evento. }
OPTIONAL { ?item wdt:P106 ?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 .
?evento rdfs:label ?eventoLabel .
}
}
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;
v18("?Occupation_")
v9("?VIAF")
v15("?VIAFLabel"):::projected
v21("?VIAF_")
v8("?awardReceived")
v13("?awardReceivedLabel"):::projected
v10("?country")
v14("?countryLabel"):::projected
v17("?country_")
v19("?event_")
v6("?evento")
v16("?eventoLabel"):::projected
v3("?item"):::projected
v11("?itemLabel"):::projected
v7("?occupation")
v12("?occupationLabel"):::projected
v20("?otherAwardsReceived_")
v4("?premio")
v2("?prizeID")
v5("?prize_date"):::projected
v17("?prize_date_")
c12(["it,#91;AUTO_LANGUAGE#93;,en"]):::literal
c10(["bd:serviceParam"]):::iri
bind0[/"'wd:Q48786'"/]
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/P793".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P106".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P166".-> v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P214".-> v9
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P27".-> v10
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
v3 --"rdfs:label"--> v11
v7 --"rdfs:label"--> v12
v8 --"rdfs:label"--> v13
v10 --"rdfs:label"--> v14
v9 --"rdfs:label"--> v15
v6 --"rdfs:label"--> v16
end
bind7[/"min(year-from-dateTime(?prize_date))"/]
v5 --o bind7
bind7 --as--o v17
bind8[/"?countryLabel"/]
v14 --o bind8
bind8 --as--o v17
bind9[/"?occupationLabel"/]
v12 --o bind9
bind9 --as--o v18
bind10[/"?eventoLabel"/]
v16 --o bind10
bind10 --as--o v19
bind11[/"?awardReceivedLabel"/]
v13 --o bind11
bind11 --as--o v20
bind12[/"?VIAFLabel"/]
v15 --o bind12
bind12 --as--o v21