query-61feea9c715cf6a613786835bd874ae3

rq turtle/ttl

Item without instance of (P31) but with IMDb id

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?imdb WHERE {
    ?item wdt:P345 ?imdb .
    FILTER NOT EXISTS { ?item wdt:P31 ?instance } 
   SERVICE wikibase:label {
     bd:serviceParam wikibase:language "en" .
   }
} ORDER BY ?imdb

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?imdb"):::projected v3("?instance") v2("?item"):::projected c4(["bd:serviceParam"]):::iri c6(["en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P31"--> e0v2 e0v2("?instance"):::projected e0v1("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> c1 f0 --> v3 v2 --"wdt:P31"--> v3 v2 --"wdt:P345"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end