query-af793775b068ec6bf12876410ec8edb1

rq turtle/ttl

Add counties of a particular state to this query 15:53, 19 July 2020 (UTC)) talk (Trilotat. How do I change the filter so that it includes results if P131 notes Nevada or a county and/or city in Nevada? Thank you. (P131)located in the administrative territorial entity is stated as (Q1227)Nevada I'm using the following query, but it only lists results if

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 ?fault ?faultLabel ?US_Quaternary_Fault_ID WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?fault wdt:P31 wd:Q47089.

  ?fault wdt:P131 wd:Q99.
  OPTIONAL { ?fault wdt:P8455 ?US_Quaternary_Fault_ID. }
}
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?US_Quaternary_Fault_ID"):::projected v1("?fault"):::projected c6(["wd:Q47089"]):::iri c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8(["wd:Q99"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"wdt:P31"--> c6 v1 --"wdt:P131"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P8455".-> v2 end