query-7dcfa55a5f54b34af08f392953b7cc6d

rq turtle/ttl

targetunit=km2Hi, is it possible to specify a target unit in SPARQL. The request which follows mixes hectares and square kilometers.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?superficie
WHERE
{
    ?item wdt:P31 wd:Q23019040 . 
    ?item wdt:P2046 ?superficie .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "fr"}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v2("?superficie"):::projected c5(["bd:serviceParam"]):::iri c2(["wd:Q23019040"]):::iri c7(["fr"]):::literal v1 --"wdt:P31"--> c2 v1 --"wdt:P2046"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end