query-22dcf3bea7920e4f0f8e7a2a82ce0bdb
coses de Chicago amb l'altura convertida a metres SELECT ?item ?itemLabel ?inst ?instLabel ?altura ?N_value ?N_unitLabel ?data WHERE { ?item wdt:P131 wd:Q1297. ?item wdt:P31 ?inst. ?item wdt:P2048 ?altura. ?item p:P2048 ?statement . # height statement
?statement psv:P2048 ?statement2 . # values as entered ?statement2 wikibase:quantityAmount ?value . ?statement2 wikibase:quantityUnit ?unit .
?statement psn:P2048 ?statement3 . # normalised values ?statement3 wikibase:quantityAmount ?N_value . ?statement3 wikibase:quantityUnit ?N_unit .
OPTIONAL {?item wdt:P571 ?data} SERVICE wikibase:label { bd:serviceParam wikibase:language "ca, en, fr, ceb" } }
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 psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX psn: <http://www.wikidata.org/prop/statement/value-normalized/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# coses de Chicago amb l'altura convertida a metres
SELECT ?item ?itemLabel ?inst ?instLabel ?altura ?N_value ?N_unitLabel ?data
WHERE {
?item wdt:P131 wd:Q1297.
?item wdt:P31 ?inst.
?item wdt:P2048 ?altura.
?item p:P2048 ?statement . # height statement
?statement psv:P2048 ?statement2 . # values as entered
?statement2 wikibase:quantityAmount ?value .
?statement2 wikibase:quantityUnit ?unit .
?statement psn:P2048 ?statement3 . # normalised values
?statement3 wikibase:quantityAmount ?N_value .
?statement3 wikibase:quantityUnit ?N_unit .
OPTIONAL {?item wdt:P571 ?data}
SERVICE wikibase:label { bd:serviceParam wikibase:language "ca, en, fr, ceb" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v10("?N_unit")
v9("?N_value"):::projected
v3("?altura"):::projected
v11("?data"):::projected
v2("?inst"):::projected
v1("?item"):::projected
v4("?statement")
v5("?statement2")
v8("?statement3")
v7("?unit")
v6("?value")
c12(["bd:serviceParam"]):::iri
c2(["wd:Q1297"]):::iri
c14(["ca, en, fr, ceb"]):::literal
v1 --"p:direct/P131"--> c2
v1 --"p:direct/P31"--> v2
v1 --"p:direct/P2048"--> v3
v1 --"p:P2048"--> v4
v4 --"p:statement/value/P2048"--> v5
v5 --"wikibase:quantityAmount"--> v6
v5 --"wikibase:quantityUnit"--> v7
v4 --"p:statement/value-normalized/P2048"--> v8
v8 --"wikibase:quantityAmount"--> v9
v8 --"wikibase:quantityUnit"--> v10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P571".-> v11
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end