My goal is to get all images related to a wikidata entity. I can get the image property (of e.g. the statue of liberty) with the following query:
SELECT ?image WHERE
{
wd:Q9202 wdt:P18 ?image.
}
This gets me the associated image but there are many types of image properties (P14, P15, P18, P41,...). They are all types of "Wikidata property for linking to a representative image (Q26940804)".
Is there an elegant way to get all properties that are subclasses of Q26940804 (getting all images)?
Truthy predicates, which start with
wdt:P, are connected towd:Q26940804not directly, but through their prototypic properties, which start withwd:P.Try it!
More info:
Also, those
wd:P18etc. are instances ofwd:Q26940804, not subclasses.