query: SELECT DISTINCT ?article ?articleLabel ?category ?categoryLabel ?commonsCategory
  {
      # ?article and ?category share the same P373 ("Commons Category")
  	?article  wdt:P373 ?commonsCategory .
  	?category wdt:P373 ?commonsCategory .
    	FILTER(?article != ?category) .   
  
      # ?article is an "article"  and ?category is an "category" item
  	?category wdt:P31 wd:Q4167836 .
    	MINUS {?article wdt:P31 wd:Q4167836 } .
    
      # P301 and P910 are set properly
      ?article  wdt:P910 ?category .
      ?category wdt:P301 ?article  .
  
  	SERVICE wikibase:label { bd:serviceParam wikibase:language "en,en" } .
  } LIMIT 500