query-4a46bda75e1e19cd9d8eb07ed8c949b9

rq turtle/ttl

title Totes les propietats utilitzades per un conjunt d'items (càmeres) SELECT ?property ?propertyLabel ?count WITH { SELECT DISTINCT ?item WHERE { ?item wdt:P31/wdt:P279 wd:Q15328 . } } AS %get_items WITH { SELECT ?property (COUNT() as ?count) WHERE { INCLUDE %get_items ?item ?claim [] . ?property wikibase:claim ?claim . } GROUP BY ?property } AS %get_properties WHERE { INCLUDE %get_properties SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . } } ORDER BY DESC(?count)

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#>
#title Totes les propietats utilitzades per un conjunt d'items (càmeres)
SELECT ?property ?propertyLabel ?count
WHERE
{

{
  SELECT ?property (COUNT(*) as ?count)
  WHERE
  {

{
  SELECT DISTINCT ?item
  WHERE
  {
    ?item wdt:P31/wdt:P279* wd:Q15328 .
  }
}    ?item ?claim [] .
    ?property wikibase:claim ?claim .
  } 
  GROUP BY ?property
}  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?claim") v5("?count"):::projected v2("?item") v4("?property"):::projected a2((" ")) a1((" ")) c3(["wd:Q15328"]):::iri c6(["bd:serviceParam"]):::iri c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v2 -->v3--> a2 v4 --"wikibase:claim"--> v3 bind1[/"count(*)"/] bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c6 --"wikibase:language"--> c8 end