query-a2e926c002478cab3b3b34c28334ed4f
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?author ?authorLabel ?dob ?dod ?birthplaceLabel ?goodreads ?countryLabel ?workLabel ?isni
(GROUP_CONCAT(DISTINCT ?occupationLabel; separator = ", ") as ?occupationLabels)
(GROUP_CONCAT(DISTINCT ?educatedLabel; separator = ", ") as ?educatedLabels )
(GROUP_CONCAT(DISTINCT ?nomineeLabel; separator = ", ") as ?nomineeLabels)
(GROUP_CONCAT(DISTINCT ?awardLabel; separator = ", ") as ?awardLabels )
(GROUP_CONCAT(DISTINCT ?genreLabel; separator = ", ") as ?genreLabels )
(GROUP_CONCAT(DISTINCT ?pseudonym; separator = ", ") as ?pseudonyms )
WHERE
{
?author rdfs:label "Jorge Luis Borges"@es .
?author rdfs:label ?authorLabel filter (lang(?authorLabel)='es').
OPTIONAL {?author wdt:P569 ?dob } .
OPTIONAL {?author wdt:P570 ?dod } .
OPTIONAL {?author wdt:P19 ?birthplace .?birthplace rdfs:label ?birthplaceLabel filter (lang(?birthplaceLabel) = "es")}.
OPTIONAL {?author wdt:P2963 ?goodreads } .
OPTIONAL {?author wdt:P27 ?country .?country rdfs:label ?countryLabel filter (lang(?countryLabel) = "es")}.
OPTIONAL {?author wdt:P742 ?pseudonym }.
OPTIONAL {?author wdt:P106 ?occupation .?occupation rdfs:label ?occupationLabel filter (lang(?occupationLabel) = "es")} .
OPTIONAL {?author wdt:P101 ?work .?work rdfs:label ?workLabel filter (lang(?workLabel) = "es")}.
OPTIONAL {?author wdt:P1411 ?nominee .?nominee rdfs:label ?nomineeLabel filter (lang(?nomineeLabel) = "es")}.
OPTIONAL {?author wdt:P69 ?educated .?educated rdfs:label ?educatedLabel filter (lang(?educatedLabel) = "es")}.
OPTIONAL {?author wdt:P166 ?award . ?award rdfs:label ?awardLabel filter (lang(?awardLabel) = "es")}.
OPTIONAL {?author wdt:P213 ?isni }.
OPTIONAL {?author wdt:P136 ?genre .?genre rdfs:label ?genreLabel filter (lang(?genreLabel) = "es")}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]" }
} GROUP BY ?author ?authorLabel ?dob ?dod ?birthplaceLabel ?goodreads ?countryLabel ?workLabel ?isni
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?author"):::projected
v9("?authorLabel"):::projected
v21("?award")
v2("?awardLabel"):::projected
v27("?awardLabels")
v13("?birthplace")
v8("?birthplaceLabel"):::projected
v15("?country")
v7("?countryLabel"):::projected
v11("?dob"):::projected
v12("?dod"):::projected
v20("?educated")
v3("?educatedLabel"):::projected
v25("?educatedLabels")
v23("?genre")
v1("?genreLabel"):::projected
v28("?genreLabels")
v14("?goodreads"):::projected
v22("?isni"):::projected
v19("?nominee")
v4("?nomineeLabel"):::projected
v26("?nomineeLabels")
v17("?occupation")
v6("?occupationLabel"):::projected
v24("?occupationLabels")
v16("?pseudonym"):::projected
v29("?pseudonyms")
v18("?work")
v5("?workLabel"):::projected
c3([sJorge Luis Borges^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal
c18(["bd:serviceParam"]):::iri
c20(["#91;AUTO_LANGUAGE#93;"]):::literal
f0[["?authorLabel = 'es'"]]
f0 --> v9
v10 --"rdfs:label"--> c3
v10 --"rdfs:label"--> v9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P569".-> v11
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P570".-> v12
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P19".-> v13
v13 --"rdfs:label"--> v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P2963".-> v14
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P27".-> v15
v15 --"rdfs:label"--> v7
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P742".-> v16
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P106".-> v17
v17 --"rdfs:label"--> v6
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P101".-> v18
v18 --"rdfs:label"--> v5
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P1411".-> v19
v19 --"rdfs:label"--> v4
end
subgraph optional9["(optional)"]
style optional9 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P69".-> v20
v20 --"rdfs:label"--> v3
end
subgraph optional10["(optional)"]
style optional10 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P166".-> v21
v21 --"rdfs:label"--> v2
end
subgraph optional11["(optional)"]
style optional11 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P213".-> v22
end
subgraph optional12["(optional)"]
style optional12 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P136".-> v23
v23 --"rdfs:label"--> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c18 --"wikibase:language"--> c20
end
bind7[/"?occupationLabel"/]
v6 --o bind7
bind7 --as--o v24
bind8[/"?educatedLabel"/]
v3 --o bind8
bind8 --as--o v25
bind9[/"?nomineeLabel"/]
v4 --o bind9
bind9 --as--o v26
bind10[/"?awardLabel"/]
v2 --o bind10
bind10 --as--o v27
bind11[/"?genreLabel"/]
v1 --o bind11
bind11 --as--o v28
bind12[/"?pseudonym"/]
v16 --o bind12
bind12 --as--o v29