query-9ec9aa9e4afb3b14e4c385241757a492

rq turtle/ttl

title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000 title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000 title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000 title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000 title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000 title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using) SELECT DISTINCT (REPLACE(STR(?item), ".Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".Q", "Q") AS ?P703) (REPLACE(STR(?art), ".Q", "Q") AS ?S248) WHERE { VALUES ?classes { wd:Q113145171 wd:Q59199015 } ?item wdt:P31 ?classes. { ?item p:P1582 ?stmt. ?stmt ps:P1582 ?taxon; prov:wasDerivedFrom ?ref. ?ref pr:P248 ?art. } } LIMIT 1000

Use at

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 p: <http://www.wikidata.org/prop/>
#title: Which are the available referenced structure-organism pairs on Wikidata? (with P1582 and not P703 we are using)
SELECT DISTINCT (REPLACE(STR(?item), ".*Q", "Q") AS ?qid) (REPLACE(STR(?taxon), ".*Q", "Q") AS ?P703) (REPLACE(STR(?art), ".*Q", "Q") AS ?S248) WHERE {
  VALUES ?classes {
    wd:Q113145171
    wd:Q59199015
  }
  ?item wdt:P31 ?classes.
  {
    ?item p:P1582 ?stmt.
    ?stmt ps:P1582 ?taxon;
      prov:wasDerivedFrom ?ref.
    ?ref pr:P248 ?art.
  }
}
LIMIT 1000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?P703") v9("?S248") v6("?art"):::projected v1("?classes") v2("?item"):::projected v7("?qid") v5("?ref") v3("?stmt") v4("?taxon"):::projected bind0[/VALUES ?classes/] bind0-->v1 bind00(["wd:Q113145171"]) bind00 --> bind0 bind01(["wd:Q59199015"]) bind01 --> bind0 v2 --"p:direct/P31"--> v1 v2 --"p:P1582"--> v3 v3 --"p:statement/P1582"--> v4 v3 --"prov:wasDerivedFrom"--> v5 v5 --"p:reference/P248"--> v6 bind1[/"replace(str(?item),'.*Q','Q')"/] v2 --o bind1 bind1 --as--o v7 bind2[/"replace(str(?taxon),'.*Q','Q')"/] v4 --o bind2 bind2 --as--o v8 bind3[/"replace(str(?art),'.*Q','Q')"/] v6 --o bind3 bind3 --as--o v9