query: SELECT ?item (COUNT(DISTINCT ?p) as ?count) (COUNT(DISTINCT ?p0) as ?with)  (?count - ?with as ?todo) ( ROUND(?with / ?count * 100 ) as ?percentage)  (SAMPLE(?p1) as ?samp)
  {
    VALUES ?item { wd:Q38 wd:Q172579 wd:Q238 wd:Q4948 wd:Q174306 wd:Q170174 wd:Q173065 wd:Q188586 wd:Q153529 wd:Q148540 wd:Q736727   } 
    ?p wdt:P27 ?item .
    ?p wdt:P31 wd:Q5 .
    OPTIONAL { ?p p:P735 [] . BIND( ?p as ?p0) }
    OPTIONAL { FILTER NOT EXISTS { ?p p:P735 [] } . BIND( ?p as ?p1) }
  }
  GROUP BY ?item 
  ORDER BY DESC(?count)