query-38d3a92d1dba76f24c6501e5b45ee519

rq turtle/ttl

TO BE IMPROVED(Maybe try MINUS) 1. I think this query is also counting interwiki links. I would like this query to tell me how many statements there are for each of these file formats. I'm not sure how to do it.

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 ?format ?formatLabel (COUNT(?p) AS ?count)

WHERE {

  ?format wdt:P31 wd:Q235557 .
  ?format ?p ?s .

  SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .

}
  }

GROUP BY ?format ?formatLabel
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?count") v2("?format"):::projected v3("?p"):::projected v4("?s") c2(["wd:Q235557"]):::iri c4(["bd:serviceParam"]):::iri c6(["en"]):::literal v2 --"wdt:P31"--> c2 v2 -->v3--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind1[/"count(?p)"/] v3 --o bind1 bind1 --as--o v5