query-96662f12068fbee0007aaf04d82bfaaf

rq turtle/ttl

title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000 title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000 title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000 title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000 title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000 title: Which are the available structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio) SELECT DISTINCT ?structure ?cas ?date WHERE { { ?structure p:P703 []; # Found in taxon p:P231 ?casStatement . # Get the CAS Registry Number } { ?casStatement ps:P231 ?cas . OPTIONAL { ?casStatement prov:wasDerivedFrom ?casReference . { ?casReference pr:P248 wd:Q18907859 . } UNION { ?casReference pr:P248 wd:Q911173 . } OPTIONAL { ?casReference pr:P813 ?date . } } } } LIMIT 1000000

Use at

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 structure found in taxon on Wikidata, for which a CAS Registry Number is available? (limited to 1mio)
SELECT DISTINCT ?structure ?cas ?date WHERE {
  {
    ?structure p:P703 [];                        # Found in taxon
               p:P231 ?casStatement .            # Get the CAS Registry Number
  }
  {
    ?casStatement ps:P231 ?cas .
    OPTIONAL {
      ?casStatement prov:wasDerivedFrom ?casReference .
      { ?casReference pr:P248 wd:Q18907859 . }
      UNION
      { ?casReference pr:P248 wd:Q911173 . }
      OPTIONAL { ?casReference pr:P813 ?date . }
    }
  }
}
LIMIT 1000000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?cas"):::projected v4("?casReference") v2("?casStatement") v5("?date"):::projected v1("?structure"):::projected a1((" ")) c7(["wd:Q911173"]):::iri c6(["wd:Q18907859"]):::iri v1 --"p:P703"--> a1 v1 --"p:P231"--> v2 v2 --"p:statement/P231"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."prov:wasDerivedFrom".-> v4 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v4 --"p:reference/P248"--> c7 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v4 --"p:reference/P248"--> c6 end union0r <== or ==> union0l end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:reference/P813".-> v5 end end