query-101c72b7f3b279700f77b6c09d166fe2

rq turtle/ttl

Propertiessubclass of (P279)instance of (P31)

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#>
SELECT ?prop ?propLabel ?count ?exampleLabel WHERE {
    {
        SELECT ?prop (COUNT(DISTINCT ?item) AS ?count) (SAMPLE(?id) AS ?example) WHERE {

           ?classes wdt:P279* wd:Q1266946 .
           ?item wdt:P31 ?classes .
           ?item ?p ?id .
           ?prop wikibase:directClaim ?p
        }  GROUP BY ?prop
    }
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en"
    }
} ORDER BY DESC (?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?classes") v7("?count"):::projected v7("?example") v5("?id") v3("?item") v4("?p") v6("?prop"):::projected c6(["bd:serviceParam"]):::iri c2(["wd:Q1266946"]):::iri c8(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal v2 --"wdt:P279"--> c2 v3 --"wdt:P31"--> v2 v3 -->v4--> v5 v6 --"wikibase:directClaim"--> v4 bind2[/"count(?item)"/] v3 --o bind2 bind2 --as--o v7 bind3[/"sample(?id)"/] v5 --o bind3 bind3 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end