query-55f3fa035580057e7b2ded81ac6e9cdb
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?author ?authorLabel ?publication ?publicationLabel ?referenceHasRole ?referenceHasRoleLabel ?PlaziID ?PlaziID_URL
WHERE
{
{?item p:P225 ?statement .
?statement prov:wasDerivedFrom ?reference .
?reference pr:P1992 ?PlaziID
BIND(IRI(CONCAT("http://treatment.plazi.org/id/",?PlaziID)) as ?PlaziID_URL)
}
?item wdt:P105 ?rank .
OPTIONAL { ?item p:P225 ?st .
?st pq:P405 ?author . }
OPTIONAL { ?item p:P225 ?statement .
?statement prov:wasDerivedFrom ?reference .
?reference pr:P248 ?publication.
OPTIONAL { ?item p:P225 ?statement .
?statement prov:wasDerivedFrom ?reference .
?reference pr:P248 ?publication.
?reference pr:P6184 ?referenceHasRole}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?PlaziID"):::projected
v6("?PlaziID_URL"):::projected
v9("?author"):::projected
v2("?item"):::projected
v1("?itemLabel"):::projected
v10("?publication"):::projected
v7("?rank")
v4("?reference")
v11("?referenceHasRole"):::projected
v8("?st")
v3("?statement")
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"p:P225"--> v3
v3 --"prov:wasDerivedFrom"--> v4
v4 --"p:reference/P1992"--> v5
bind0[/"concat('http://treatment.plazi.org/id/',?PlaziID)"/]
v5 --o bind0
bind0 --as--o v6
v2 --"p:direct/P105"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P225".-> v8
v8 --"p:qualifier/P405"--> v9
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P225".-> v3
v3 --"prov:wasDerivedFrom"--> v4
v4 --"p:reference/P248"--> v10
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:P225".-> v3
v3 --"prov:wasDerivedFrom"--> v4
v4 --"p:reference/P248"--> v10
v4 --"p:reference/P6184"--> v11
end
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end