query-0e81a16d66b13730cf6a8b63dca95c0d
With units :
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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?person ?personLabel ?genderLabel ?height ?heightUnitLabel ?weight ?weightUnitLabel WHERE
{
?person wdt:P31 wd:Q5 .
?person wdt:P2048 ?height .
?person p:P2048 [ a wikibase:BestRank ; psv:P2048 [ wikibase:quantityAmount ?height ; wikibase:quantityUnit ?heightUnit ] ] .
?person wdt:P2067 ?weight .
?person p:P2067 [ a wikibase:BestRank ; psv:P2067 [ wikibase:quantityAmount ?weight ; wikibase:quantityUnit ?weightUnit ] ] .
?person wdt:P21 ?gender
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 5000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?gender")
v2("?height"):::projected
v3("?heightUnit")
v1("?person"):::projected
v4("?weight"):::projected
v5("?weightUnit")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
c5(["wikibase:BestRank"]):::iri
c15(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P2048"--> v2
a1 --"a"--> c5
a2 --"wikibase:quantityAmount"--> v2
a2 --"wikibase:quantityUnit"--> v3
a1 --"p:statement/value/P2048"--> a2
v1 --"p:P2048"--> a1
v1 --"p:direct/P2067"--> v4
a3 --"a"--> c5
a4 --"wikibase:quantityAmount"--> v4
a4 --"wikibase:quantityUnit"--> v5
a3 --"p:statement/value/P2067"--> a4
v1 --"p:P2067"--> a3
v1 --"p:direct/P21"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end