query: SELECT DISTINCT ?item ?itemLabel ?enddate ?denomLabel ?inception ?architectLabel WITH {
    SELECT DISTINCT ?item ?denom ?inception ?architect WHERE {
      ?item wdt:P131* wd:Q365 .
      OPTIONAL { ?item wdt:P140 ?denom .
      ?item wdt:P571 ?inception .
      ?item wdt:P84 ?architect.}
    }
  } AS %subquery WHERE {
    INCLUDE %subquery .
    ?item p:P31 ?statementNode .
    ?statementNode ps:P31/wdt:P279* wd:Q16970 .
  
    OPTIONAL {
      ?statementNode pq:P582 ?enddate .
     
    }
    SERVICE wikibase:label { bd:serviceParam wikibase:language 'de,en' }
  }