query-37a265dda696177141e038b87526851d
Trilotat
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
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;
(wdt:P131+) wd:Q816.
OPTIONAL {
?fault wdt:P8455 ?US_Quaternary_Fault_ID.
BIND (REPLACE(?US_Quaternary_Fault_ID, "^([0-9]+).*$", "$1") AS ?number)
BIND (STRAFTER(?US_Quaternary_Fault_ID, ?number) AS ?after)
}
}
ORDER BY xsd:integer(?number) ?after
LIMIT 1000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?US_Quaternary_Fault_ID"):::projected
v5("?after")
v3("?fault"):::projected
v5("?number")
c6(["wd:Q47089"]):::iri
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["wd:Q816"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v3 --"wdt:P31"--> c6
v3 --"wdt:P131"--> c8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P8455".-> v4
bind0[/"replace(?US_Quaternary_Fault_ID,'^(#91;0-9#93;+).*$','$1')"/]
v4 --o bind0
bind0 --as--o v5
bind1[/"substring-after(?US_Quaternary_Fault_ID,?number)"/]
v4 --o bind1
v5 --o bind1
bind1 --as--o v5
end