query-bc4e54f81e293c7055a23b5b2a040c22
Lars W. PREFIX wdt: http://www.wikidata.org/prop/direct/ PREFIX wd: http://www.wikidata.org/entity/ PREFIX type: https://larsgw.github.io/ctj/rdf/#/type/ PREFIX cito: http://purl.org/spar/cito/ PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
SELECT ?article_on_wikidata ?species_name ?species_on_wikidata ?species_name_wikidata
WHERE { ?item wdt:P932 ?pmcid ; cito:discusses ?species . ?species a type:binomial ; rdfs:label ?species_name .
SERVICE https://query.wikidata.org/bigdata/namespace/wdq/sparql/ {
?article_on_wikidata wdt:P932 ?pmcid .
?species_on_wikidata wdt:P225 ?species_name ;
rdfs:label ?species_name_wikidata .
FILTER(lang(?species_name_wikidata) = 'en')
}
}
Use at
- https://query.wikidata.org/sparql
#Lars W.
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX type: <https://larsgw.github.io/ctj/rdf/#/type/>
PREFIX cito: <http://purl.org/spar/cito/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT
?article_on_wikidata
?species_name
?species_on_wikidata
?species_name_wikidata
WHERE
{
?item wdt:P932 ?pmcid ; cito:discusses ?species .
?species a type:binomial ; rdfs:label ?species_name .
SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql/> {
?article_on_wikidata wdt:P932 ?pmcid .
?species_on_wikidata wdt:P225 ?species_name ;
rdfs:label ?species_name_wikidata .
FILTER(lang(?species_name_wikidata) = 'en')
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?article_on_wikidata"):::projected
v1("?item")
v2("?pmcid")
v3("?species")
v4("?species_name"):::projected
v5("?species_name_wikidata"):::projected
v7("?species_on_wikidata"):::projected
c4([https://larsgw.github.io/ctj/rdf/#/type/binomial]):::iri
v1 --"wdt:P932"--> v2
v1 --http://purl.org/spar/cito/discusses--> v3
v3 --"a"--> c4
v3 --"rdfs:label"--> v4
subgraph s1["https://query.wikidata.org/bigdata/namespace/wdq/sparql/"]
style s1 stroke-width:4px;
f0[["?species_name_wikidata = 'en'"]]
f0 --> v5
v6 --"wdt:P932"--> v2
v7 --"wdt:P225"--> v4
v7 --"rdfs:label"--> v5
end