query-a873d3e61caae44cd1280c9d290d2f6f

rq turtle/ttl

TODO

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 ?property ?propertyLabel ?count ?propertyType
{

{
  SELECT ?property (COUNT(DISTINCT ?country) AS ?count)
  {

{
  SELECT DISTINCT ?country
  {
    ?country wdt:P31 / wdt:P279 * wd:Q6256 . # ?country is a country or a subclass of it
  }
}    ?country ?truthy_claim [] .
    ?property wikibase:directClaim ?truthy_claim
  }
  GROUP BY ?property
}  OPTIONAL { ?property wikibase:propertyType wikibase:ExternalId.
             BIND("External-ID" as ?propertyType) }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ORDER BY ?propertyType DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?count"):::projected v3("?country") v5("?property"):::projected v6("?propertyType"):::projected v4("?truthy_claim") a2((" ")) a1((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c3(["wd:Q6256"]):::iri c6(["wikibase:ExternalId"]):::iri v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v3 -->v4--> a2 v5 --"wikibase:directClaim"--> v4 bind1[/"count(?country)"/] v3 --o bind1 bind1 --as--o v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."wikibase:propertyType".-> c6 bind2[/"'External-ID'"/] bind2 --as--o v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end