Daniel,
On Sun, Jan 10, 2016 at 3:53 AM, Daniel Mietchen
<daniel.mietchen(a)googlemail.com> wrote:
What I want now is a list of (ideally) statements (or
- less ideally -
items with such statements) that have references of one of the types
given in (1) and (2).
It would look something like:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
SELECT ?statement ?PMID ?PMCID WHERE {
?statement prov:wasDerivedFrom/pr:P248 ?paper .
?paper wdt:P31 wd:Q13442814 .
OPTIONAL { ?paper wdt:P698 ?PMID . }
OPTIONAL { ?paper wdt:P932 ?PMCID . }
}
https://query.wikidata.org/#PREFIX%20wd%3A%20%3Chttp%3A%2F%2Fwww.wikidata.o…
Then you can filter for your two options with:
FILTER (BOUND(?PMID))
FILTER (!BOUND(?PMID))
Grtz,
Egon
--
E.L. Willighagen
Department of Bioinformatics - BiGCaT
Maastricht University (
http://www.bigcat.unimaas.nl/)
Homepage:
http://egonw.github.com/
LinkedIn:
http://se.linkedin.com/in/egonw
Blog:
http://chem-bla-ics.blogspot.com/
PubList:
http://www.citeulike.org/user/egonw/tag/papers
ORCID: 0000-0001-7542-0286
ImpactStory:
https://impactstory.org/EgonWillighagen