query: bigdata/namespace/wdq/sparql?explain&query=PREFIX wd: <http://www.wikidata.org/entity/>
  PREFIX wdt: <http://www.wikidata.org/prop/direct/>
  PREFIX wikibase: <http://wikiba.se/ontology#>
  PREFIX p: <http://www.wikidata.org/prop/>
  PREFIX v: <http://www.wikidata.org/prop/statement/>
  PREFIX q: <http://www.wikidata.org/prop/qualifier/>
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  PREFIX ps: <http://www.wikidata.org/prop/statement/>
  PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
  
    # Query to find the properties that most often connect to
    # items in the class ?tgt_class = Q4167410
    # Query generated by [[Template:InboundPropertiesToClass]]
  
   SELECT ?property ?propertyLabel ?count WHERE {
    hint:Query hint:optimizer "None" . 
    {
      SELECT ?p (COUNT(*) AS ?count) WHERE {
         BIND (wd:Q4167410 AS ?tgt_class) .
         ?b wdt:P31 ?tgt_class .
         ?a ?p ?b .
      } GROUP BY ?p LIMIT 100
    } . 
    ?property wikibase:directClaim ?p .
    SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
    }
  }
  # HAVING (?count > 1)
  ORDER BY DESC(?count) # ?pLabel
  # LIMIT 100