query-ddb558795d96e860f08352f02bcaa3d1
Evolución de la esperanza de vida en España
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
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 ?fecha (AVG(?ev) AS ?esperanza_vida) WHERE {
wd:Q29 p:P2250 ?ev_statement.
?ev_statement ps:P2250 ?ev;
pq:P585 ?fecha.
SERVICE wikibase:label
{ bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
}
GROUP BY ?fecha
Query found at
- https://www.wikidata.org/wiki/User:Japastorsanchez/webdatos-2022-2023-laboratorio2
- https://www.wikidata.org/wiki/User:Japastorsanchez/webdatos-2022-2023-laboratorio2-soluciones
- https://www.wikidata.org/wiki/User:Japastorsanchez/webdatos-2023-2024/laboratorio-3
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?esperanza_vida")
v2("?ev"):::projected
v1("?ev_statement")
v3("?fecha"):::projected
c1(["wd:Q29"]):::iri
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,es"]):::literal
c1 --"p:P2250"--> v1
v1 --"p:statement/P2250"--> v2
v1 --"p:qualifier/P585"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind1[/"average(?ev)"/]
v2 --o bind1
bind1 --as--o v4