query-9555ffde81b51664f6144260d98447a3

rq turtle/ttl

Propertiesinstance 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 DISTINCT ?property ?propertyLabel ?count


WHERE {
   {
  SELECT DISTINCT ?property (COUNT(*) AS ?count) WHERE {
   {
  SELECT DISTINCT ?item WHERE {
    SERVICE bd:sample { ?item wdt:P31 wd:Q5 . bd:serviceParam bd:sample.limit 200000 }       
  }
}
    ?item ?p [ ] .
    ?property a wikibase:Property;
                wikibase:claim ?p.
  }
  GROUP BY ?property 
  LIMIT 100
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC(?count)
LIMIT 100

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count"):::projected v2("?item") v3("?p") v4("?property"):::projected a1((" ")) c4(["bd:serviceParam"]):::iri c6(["200000^^xsd:integer"]):::literal c8(["wikibase:Property"]):::iri c3(["wd:Q5"]):::iri c12(["en"]):::literal subgraph s1["http://www.bigdata.com/rdf#sample"] style s1 stroke-width:4px; v2 --"wdt:P31"--> c3 c4 --"bd:sample.limit"--> c6 end v2 -->v3--> a1 v4 --"a"--> c8 v4 --"wikibase:claim"--> v3 bind1[/"count(*)"/] bind1 --as--o v5 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"wikibase:language"--> c12 end