Wikidata:WikiProject Geology/Queries

From Wikidata
Jump to navigation Jump to search

Maintenance[edit]

SELECT ?item ?itemLabel WHERE {
	?item wdt:P31 wd:Q736917 .
	filter not exists { ?item rdfs:label ?eslabel filter (lang(?eslabel) = "es") } .
  	SERVICE wikibase:label {
		bd:serviceParam wikibase:language "en" .
	}
}
Try it!
SELECT ?item ?itemLabel WHERE {
	?item wdt:P31 wd:Q11755860 .
	filter not exists { ?item rdfs:label ?delabel filter (lang(?delabel) = "de") } .
  	SERVICE wikibase:label {
		bd:serviceParam wikibase:language "en" .
	}
}
Try it!


# Find all formations that are missing an underlying and overlying unit
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q736917 .
  FILTER NOT EXISTS { ?item wdt:P568 ?x; wdt:P567 ?y } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
Try it!


# Find all formations that are missing a country statement
SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q736917 .
  FILTER NOT EXISTS { ?item wdt:P17 ?x } .
  MINUS { ?item a wdno:P17 } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
Try it!
Can someone edit this to exclude formations listed with "NO VALUE", e.g. Antarctica? Trilotat (talk) 18:24, 9 February 2019 (UTC)[reply]
✓ Done Matěj Suchánek (talk) 21:01, 9 February 2019 (UTC)[reply]

Showcase[edit]

  • ...