query-30a6d62e5e34041957c86fd6e722cfce

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?property ?propertyLabel ?count ?type WHERE
{
   { 
  SELECT ?property (count(distinct ?item) as ?count)  ?type WHERE {

  VALUES ?item {wd:Q20906509
               wd:Q74457662
               wd:Q20897620 }
    ?item ?predicate ?value .
    ?property wikibase:directClaim ?predicate .
    OPTIONAL{?property wikibase:propertyType ?type}
  } group by ?property ?type }  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . }

} order by ?type desc(?count)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?count"):::projected v3("?item") v4("?predicate") v6("?property"):::projected v1("?type"):::projected v5("?value") c4(["bd:serviceParam"]):::iri c6(["en"]):::literal bind0[/VALUES ?item/] bind0-->v3 bind00(["wd:Q20906509"]) bind00 --> bind0 bind01(["wd:Q74457662"]) bind01 --> bind0 bind02(["wd:Q20897620"]) bind02 --> bind0 v3 -->v4--> v5 v6 --"wikibase:directClaim"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."wikibase:propertyType".-> v1 end bind2[/"count(?item)"/] v3 --o bind2 bind2 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end