query-6831ae808ebd8eb201d9420a66b7bbc2
Autores brasileiros por UF
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?label ?subj ?placeLabel ?place ?ufLabel ?uf ?page WHERE {
?subj wdt:P31 wd:Q5 . #who are human
?page schema:about ?subj.
?page schema:isPartOf <https://pt.wikisource.org/> . #who are on pt.wikisource.org
?subj wdt:P19 ?place . #lugar de nascimento
?place wdt:P625 ?coord . #coordenadas
?place wdt:P131 ?uf . #Estado
?place wdt:P17 wd:Q155 .
?subj rdfs:label ?label filter (lang(?label) = "pt")
OPTIONAL { ?subj wdt:P569 ?dob .}. #data de nascimento
BIND(YEAR(?dob) as ?birthyear). #exibe ano de nascimento
OPTIONAL { ?subj wdt:P570 ?dod .}. #data de nascimento
BIND(YEAR(?dod) as ?deathyear). #exibe ano de nascimento
SERVICE wikibase:label {
bd:serviceParam wikibase:language "pt-br,pt,it,fr,en" .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?birthyear")
v5("?coord")
v10("?deathyear")
v7("?dob")
v9("?dod")
v1("?label"):::projected
v3("?page"):::projected
v4("?place"):::projected
v2("?subj"):::projected
v6("?uf"):::projected
c18(["pt-br,pt,it,fr,en"]):::literal
c16(["bd:serviceParam"]):::iri
c6([https://pt.wikisource.org/]):::iri
c3(["wd:Q5"]):::iri
c11(["wd:Q155"]):::iri
f0[["?label = 'pt'"]]
f0 --> v1
v2 --"wdt:P31"--> c3
v3 --"schema:about"--> v2
v3 --"schema:isPartOf"--> c6
v2 --"wdt:P19"--> v4
v4 --"wdt:P625"--> v5
v4 --"wdt:P131"--> v6
v4 --"wdt:P17"--> c11
v2 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v7
end
bind1[/"year-from-dateTime(?dob)"/]
v7 --o bind1
bind1 --as--o v8
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P570".-> v9
end
bind2[/"year-from-dateTime(?dod)"/]
v9 --o bind2
bind2 --as--o v10
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end