PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX datacite: <http://purl.org/spar/datacite/>
PREFIX literal: <http://purl.org/spar/literal/>
SELECT ?category (SUM(?count) as ?num_total) (100 * SUM(?count) / MAX(?total) as ?percent) WHERE { {{SELECT * WHERE {{
  SELECT ?p (COUNT(?p) AS ?count) WHERE {
    ?s ?p ?o
  } GROUP BY ?p 
  }
  BIND (?p = datacite:hasIdentifier || ?p = datacite:hasLiteralValue || ?p = datacite:usesIdentifierScheme || ?p = literal:hasLiteralValue || ?p = dblp:hasSignature || REGEX(?p, "<https://dblp.org/rdf/schema#signature") as ?prop)
  BIND (?p = rdfs:label || ?p = dblp:title AS ?label)
  BIND (REGEX(?p, "<https://dblp.org/rdf/schema#") && !?label && !?prop as ?truthy)
  BIND (0 AS ?description)
  BIND (?p = rdf:type AS ?type)
  BIND (?p = owl:sameAs AS ?meta)
  BIND(SUM(?count) AS ?total)  } } BIND (0 as ?num_predicates).
 BIND (0 as ?num_subjects).
BIND (0 as ?num_triples)
} UNION {
 {SELECT (COUNT(DISTINCT ?p) as ?count) WHERE {?s ?p ?o}} BIND (1 as ?num_predicates) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_triples) BIND(0 as ?num_subjects)
} UNION {
 {SELECT (COUNT(DISTINCT ?s) as ?count) WHERE {?s ?p ?o}} BIND (1 as ?num_subjects) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_triples) BIND(0 as ?num_predicates) 
} UNION {
{SELECT (COUNT(?p) as ?count) WHERE {?s ?p ?o}} BIND(1 as ?num_triples) BIND(0 as ?prop) BIND (0 as ?truthy) BIND (0 as ?label) BIND(0 as ?type) BIND(0 as ?description) BIND(0 as ?meta) BIND (0 as ?num_predicates) BIND(0 as ?num_subjects)
}
 VALUES (?prop ?truthy ?label ?type ?description ?meta ?num_predicates ?num_subjects ?num_triples ?category) {
    (0 0 0 0 0 0 0 0 0 "other") (1 0 0 0 0 0 0 0 0 "reified") (0 1 0 0 0 0 0 0 0 "normal") 
	(0 0 1 0 0 0 0 0 0 "label") (0 0 0 1 0 0 0 0 0 "type") (0 0 0 0 1 0 0 0 0 "description") 
	(0 0 0 0 0 1 0 0 0 "meta") (0 0 0 0 0 0 1 0 0 "num predicates") (0 0 0 0 0 0 0 1 0 "num subjects") 
	(0 0 0 0 0 0 0 0 1 "num triples") } 
} GROUP BY ?category