query-08e59095a03b688a75f539bb176ed529
Items with an ISSN and a Wikispecies entry 12:44, 12 November 2017 (UTC) Andy's edits; Talk to Andy); Pigsonthewing (Andy MabbettCan someone write a query for the above, please?
Use at
- https://query.wikidata.org/sparql
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?item ?label ?issn ?specieslink WHERE {
?item p:P236 [ ps:P236 ?issn ] .
?specieslink schema:about ?item; schema:isPartOf <https://species.wikimedia.org/> .
?item rdfs:label ?label .
FILTER(LANG(?label) = 'en' && SUBSTR(STR(?label), 1, 4) = 'ISSN') .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?issn"):::projected
v3("?item"):::projected
v1("?label"):::projected
v4("?specieslink"):::projected
a1((" "))
c9([https://species.wikimedia.org/]):::iri
f0[["?label = 'en'substring(str(?label),'1^^xsd:integer','4^^xsd:integer') = 'ISSN'"]]
f0 --> v1
a1 --"p:statement/P236"--> v2
v3 --"p:P236"--> a1
v4 --"schema:about"--> v3
v4 --"schema:isPartOf"--> c9
v3 --"rdfs:label"--> v1