query-72db4b0e056168c562826af2e650052d

rq turtle/ttl

Hints (JHeald) SELECT ?prop ?propLabel ?count WHERE { { SELECT ?prop (COUNT(DISTINCT ?item) AS ?count) WHERE {

       hint:Query hint:optimizer "None" .
       ?item wdt:P4200 [] .
       ?item ?p ?id .
       ?prop wikibase:directClaim ?p .
       {?prop wdt:P31/wdt:P279* wd:Q19847637}  # Wikidata property representing a unique identifier 
         UNION
       {?prop wdt:P31/wdt:P279* wd:Q18614948}  # Wikidata property for authority control


    }  GROUP BY ?prop
}

SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
}

} ORDER BY DESC (?count)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Hints (JHeald)
SELECT ?prop ?propLabel ?count WHERE {
    {
        SELECT ?prop (COUNT(DISTINCT ?item) AS ?count) WHERE {


           ?item wdt:P4200 [] .
           ?item ?p ?id .
           ?prop wikibase:directClaim ?p .
           {?prop wdt:P31/wdt:P279* wd:Q19847637}  # Wikidata property representing a unique identifier 
             UNION
           {?prop wdt:P31/wdt:P279* wd:Q18614948}  # Wikidata property for authority control


        }  GROUP BY ?prop
    }

    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }

} ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count"):::projected v4("?id") v2("?item") v3("?p") v5("?prop"):::projected a1((" ")) a2((" ")) a3((" ")) c5(["wd:Q19847637"]):::iri c6(["wd:Q18614948"]):::iri c8(["bd:serviceParam"]):::iri c10(["en"]):::literal v2 --"wdt:P4200"--> a1 v2 -->v3--> v4 v5 --"wikibase:directClaim"--> v3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v5 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c5 end union0r <== or ==> union0l end bind1[/"count(?item)"/] v2 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end