query-96c1bfc105f393e8e4c535b42f4169b9
Map
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 ?place ?placeLabel ?subj ?label ?coord ?birthyear 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
?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
SERVICE wikibase:label {
bd:serviceParam wikibase:language "pt" .
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?birthyear"):::projected
v5("?coord"):::projected
v6("?dob")
v1("?label"):::projected
v3("?page")
v4("?place"):::projected
v2("?subj"):::projected
c1(["pt"]):::literal
c12(["bd:serviceParam"]):::iri
c6([https://pt.wikisource.org/]):::iri
c3(["wd:Q5"]):::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
v2 --"rdfs:label"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P569".-> v6
end
bind1[/"year-from-dateTime(?dob)"/]
v6 --o bind1
bind1 --as--o v7
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c1
end