query: #title: Works with creator missing link
  # Complex constraint from [[Property talk:P4025]]
  # List of works that are in [[Property:P195|collection&#32;<small dir="ltr">(P195)</small>]] [[d:Q812285|Bavarian State Painting Collections <small>(Q812285)</small>]] and have [[Property:P170|creator&#32;<small dir="ltr">(P170)</small>]] set, but that creator doesn't have a [[Property:P4025|Pinakothek artist ID&#32;<small dir="ltr">(P4025)</small>]] link
  SELECT ?item ?url ?creator ?creatorurl ?creatorid
  {
  	?item wdt:P195 wd:Q812285 .
  	?item wdt:P170 ?creator .
  	MINUS { ?creator wdt:P4025 [] } .
  	MINUS { ?item wdt:P170 wd:Q4233718 } . # Filter out anonymous
  	OPTIONAL {?item wdt:P973 ?url } .
      OPTIONAL {?item p:P31 ?instancestatement . 
                ?instancestatement prov:wasDerivedFrom/pr:P854 ?referenceurl .
                BIND(IRI(REPLACE(STR(?referenceurl), '^(.+)\\/([^\\/]+)$', '$1')) AS ?creatorurl) .
                BIND(REPLACE(STR(?referenceurl), '^(.+)\\/([^\\/]+)\\/([^\\/]+)$', '$2') AS ?creatorid)
                } 
  }