query-f7b126a2abdecccd14773d6349514f50

rq turtle/ttl

Property usage counts

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?prop (SAMPLE(?propLabel) as ?label) (SAMPLE(?item) as ?sampleItem) (COUNT(?item) AS ?count)
WHERE
{
    ?item ?p wd:Q121594 . 
    ?prop ?ref ?p .
    ?prop a wikibase:Property .
    ?prop rdfs:label ?propLabel .
    FILTER (lang(?propLabel) = "en")
}
GROUP BY ?prop
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?count") v3("?item"):::projected v7("?label") v4("?p") v5("?prop"):::projected v2("?propLabel"):::projected v6("?ref") v8("?sampleItem") c4(["wikibase:Property"]):::iri c2(["wd:Q121594"]):::iri f0[["?propLabel = 'en'"]] f0 --> v2 v3 -->v4--> c2 v5 -->v6--> v4 v5 --"a"--> c4 v5 --"rdfs:label"--> v2 bind4[/"sample(?propLabel)"/] v2 --o bind4 bind4 --as--o v7 bind5[/"sample(?item)"/] v3 --o bind5 bind5 --as--o v8 bind6[/"count(?item)"/] v3 --o bind6 bind6 --as--o v9