query-1f8cde3d68a713b91e61dce994aa8aeb
Co-occurrence of ScienceSource annotations with known Wikidata drug-disease treatment pairs filtered out. PREFIX ss: http://sciencesource.wmflabs.org/entity/ PREFIX sst: http://sciencesource.wmflabs.org/prop/direct/
SELECT ?drugann ?drug ?diseaseann ?disease ?articletitle ?articledate
WHERE
{
SERVICE http://sciencesource-query.wmflabs.org/proxy/wdqs/bigdata/namespace/wdq/sparql
{ ?diseaseann sst:P2 ?wdcode1;
sst:P15 ?disease;
sst:P16 "infectiousdiseases";
sst:P19 ?anchor1.
?drugann sst:P2 ?wdcode2;
sst:P15 ?drug;
sst:P16 "infectiousdiseasesdrugs";
sst:P19 ?anchor2.
?anchor1 sst:P10 ?charnumber1.
?anchor2 sst:P10 ?charnumber2.
?anchor1 sst:P12 ?article.
?anchor2 sst:P12 ?article.
?article sst:P17 ?articledate.
?article sst:P20 ?articletitle.
FILTER (abs(?charnumber2 - ?charnumber1) < 200)
}
?item1 wdt:P31 wd:Q12136.
FILTER(str(?item1) = CONCAT("http://wikidata.org/entity/", ?wdcode1))
?item2 wdt:P31 wd:Q11173.
FILTER(str(?item2) = CONCAT("http://wikidata.org/entity/", ?wdcode2))
MINUS {?item2 wdt:P2175 ?item1}
}
LIMIT 100
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#Co-occurrence of ScienceSource annotations with known Wikidata drug-disease treatment pairs filtered out.
PREFIX ss: <http://sciencesource.wmflabs.org/entity/>
PREFIX sst: <http://sciencesource.wmflabs.org/prop/direct/>
SELECT ?drugann ?drug ?diseaseann ?disease ?articletitle ?articledate
WHERE
{
SERVICE <http://sciencesource-query.wmflabs.org/proxy/wdqs/bigdata/namespace/wdq/sparql>
{ ?diseaseann sst:P2 ?wdcode1;
sst:P15 ?disease;
sst:P16 "infectiousdiseases";
sst:P19 ?anchor1.
?drugann sst:P2 ?wdcode2;
sst:P15 ?drug;
sst:P16 "infectiousdiseasesdrugs";
sst:P19 ?anchor2.
?anchor1 sst:P10 ?charnumber1.
?anchor2 sst:P10 ?charnumber2.
?anchor1 sst:P12 ?article.
?anchor2 sst:P12 ?article.
?article sst:P17 ?articledate.
?article sst:P20 ?articletitle.
FILTER (abs(?charnumber2 - ?charnumber1) < 200)
}
?item1 wdt:P31 wd:Q12136.
FILTER(str(?item1) = CONCAT("http://wikidata.org/entity/", ?wdcode1))
?item2 wdt:P31 wd:Q11173.
FILTER(str(?item2) = CONCAT("http://wikidata.org/entity/", ?wdcode2))
MINUS {?item2 wdt:P2175 ?item1}
}
LIMIT 100