query-d44589d10ef5e2cad5e79f5ce714c4b2
Min StatsCan codes
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (MIN(?StatsCanCode) as ?minStatsCanCode)
WHERE
{
?item wdt:P3012 ?StatsCanCode
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
GROUP BY ?item ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?StatsCanCode"):::projected
v1("?item"):::projected
v3("?minStatsCanCode")
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;"]):::literal
v1 --"wdt:P3012"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
bind1[/"min(?StatsCanCode)"/]
v2 --o bind1
bind1 --as--o v3