query-5d0ada442b59381eae26c22caeaece2e

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?sen ?bioid (SUBSTR(STR(?val), ((STRLEN(STR(?val))) - (STRLEN(?bioid))) + 1 ) as ?urlid) WHERE {
  ?sen p:P39 ?stmt;
    wdt:P1157 ?bioid.
  ?stmt ps:P39 wd:Q4416090;
    pq:P2937 ?term;
    prov:wasDerivedFrom ?ref.
  ?ref pr:P854 ?val.
  FILTER((SUBSTR(STR(?val), ((STRLEN(STR(?val))) - (STRLEN(?bioid))) + 1 )) != ?bioid )
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?bioid"):::projected v6("?ref") v3("?sen"):::projected v4("?stmt") v5("?term") v7("?urlid") v1("?val"):::projected c10(["bd:serviceParam"]):::iri c5(["wd:Q4416090"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["substring(str(?val),string-length(str(?val)) - string-length(?bioid) + '1^^xsd:integer') != ?bioid"]] f0 --> v1 f0 --> v2 v3 --"p:P39"--> v4 v3 --"p:direct/P1157"--> v2 v4 --"p:statement/P39"--> c5 v4 --"p:qualifier/P2937"--> v5 v4 --"prov:wasDerivedFrom"--> v6 v6 --"p:reference/P854"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end bind1[/"substring(str(?val),string-length(str(?val)) - string-length(?bioid) + '1^^xsd:integer')"/] v1 --o bind1 v2 --o bind1 bind1 --as--o v7