A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/work_associated-images.sparql
Work aspect: associated images
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#defaultView:ImageGrid
PREFIX target: <http://www.wikidata.org/entity/Q28942417>
SELECT DISTINCT ?image WHERE {
{
# Images from whatever property value is linked.
# Excluded "different from" property and take all other properties
target: !wdt:P1889 ?item .
?item wdt:P18 ?image .
}
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?image"):::projected
v1("?item")
a1((" "))
c2([http://www.wikidata.org/entity/Q28942417]):::iri
f0[[" != 'p:direct/P1889'"]]
f0 --> a1
c2 -->a1--> v1
v1 --"p:direct/P18"--> v2