query-ce094d34b98a3c8d1bd3ddcd91445c0d
Find all mineral type localities and which you can render as a map SELECT ?locality ?name ?location WHERE { ?mineral wdt:P579 ?status . ?mineral wdt:P2695 ?locality . # Where a locality statement exists
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?locality rdfs:label ?name
}
?locality wdt:P625 ?location
} GROUP BY ?locality ?name ?location
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Find all mineral type localities and which you can render as a map
SELECT ?locality ?name ?location
WHERE
{
?mineral wdt:P579 ?status .
?mineral wdt:P2695 ?locality . # Where a locality statement exists
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
?locality rdfs:label ?name
}
?locality wdt:P625 ?location
}
GROUP BY ?locality ?name ?location
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?locality"):::projected
v5("?location"):::projected
v1("?mineral")
v4("?name"):::projected
v2("?status")
c4(["bd:serviceParam"]):::iri
c6(["en"]):::literal
v1 --"wdt:P579"--> v2
v1 --"wdt:P2695"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
v3 --"rdfs:label"--> v4
end
v3 --"wdt:P625"--> v5