query-2cbe712c55056e2aaad7a068091b482b

rq turtle/ttl

property labels to translate in Dagbani language (Dag) SELECT ?property ?propertyLabel ?usageCount WHERE { { SELECT ?directClaimProperty (COUNT(*) AS ?usageCount) WHERE { ?s ?directClaimProperty ?o. ?page schema:isPartOf https://dag.wikipedia.org/; schema:about ?s. } GROUP BY ?directClaimProperty } ?property wikibase:directClaim ?directClaimProperty. FILTER(NOT EXISTS { ?property wikibase:propertyType wikibase:ExternalId. }) FILTER(NOT EXISTS { ?property rdfs:label ?label. FILTER((LANG(?label)) = "dag") }) SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } ORDER BY DESC (?usageCount)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# property labels to translate in Dagbani language (Dag)
SELECT ?property ?propertyLabel ?usageCount WHERE {
  {
    SELECT ?directClaimProperty (COUNT(*) AS ?usageCount) WHERE {
      ?s ?directClaimProperty ?o.
      ?page schema:isPartOf <https://dag.wikipedia.org/>;
        schema:about ?s.
    }
    GROUP BY ?directClaimProperty
  }
  ?property wikibase:directClaim ?directClaimProperty.
  FILTER(NOT EXISTS { ?property wikibase:propertyType wikibase:ExternalId. })
  FILTER(NOT EXISTS {
    ?property rdfs:label ?label.
    FILTER((LANG(?label)) = "dag")
  })
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY DESC (?usageCount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?directClaimProperty") v2("?label") v6("?o") v7("?page") v3("?property"):::projected v4("?s") v8("?usageCount"):::projected c10(["bd:serviceParam"]):::iri c12(["en"]):::literal c6([https://dag.wikipedia.org/]):::iri c4(["wikibase:ExternalId"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0f0[["?label = 'dag'"]] e0f0 --> e0v1 e0v2 --"rdfs:label"--> e0v1 e0v1("?label"):::projected e0v2("?property"):::projected end f0--EXISTS--> f0e0 f0 --> v2 f0 --> v3 f0 --> c2 f1[["?label = 'dag'"]] f1 --> v2 v3 --"rdfs:label"--> v2 f2[["not "]] subgraph f2e1["Exists Clause"] e1v1 --"wikibase:propertyType"--> e1c2 e1v1("?property"):::projected e1c2(["wikibase:ExternalId"]):::iri end f2--EXISTS--> f2e1 f2 --> v3 f2 --> c3 f2 --> c4 v3 --"wikibase:propertyType"--> c4 v4 -->v5--> v6 v7 --"schema:isPartOf"--> c6 v7 --"schema:about"--> v4 bind4[/"count(*)"/] bind4 --as--o v8 v3 --"wikibase:directClaim"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end