query-e8ee3bb8025883f005dcfb9c1a5d6907

rq turtle/ttl

]reply[09:30, 10 June 2020 (UTC) pagetalk / TomT0m author ? Does not need a starting point. ]reply[10:25, 10 June 2020 (UTC) JuraIs there are way to get it into table form (for Listeria)? (e.g. as when clicking on the icon "hierarchical layout up to down") ---

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#>
#defaultView:Graph
SELECT ?item ?itemLabel ?pic ?count ?coor ?linkTo
WHERE 
{

{
  SELECT ?item (COUNT(DISTINCT ?down) as ?count)
  {  ?item wdt:P177 wd:Q14339 ; wdt:P2674* ?down } 
  GROUP BY ?item
  ORDER BY DESC(?count) ?item
}  ?item wdt:P177 wd:Q14339 .
  OPTIONAL { ?item wdt:P18 ?pic }
  OPTIONAL { ?item wdt:P625 ?coor }
  OPTIONAL { ?item wdt:P2674 ?linkTo }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count) ?item

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?coor"):::projected v4("?count"):::projected v3("?down") v2("?item"):::projected v6("?linkTo"):::projected v4("?pic"):::projected c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q14339"]):::iri v2 --"wdt:P177"--> c2 v2 --"wdt:P2674"--> v3 bind1[/"count(?down)"/] v3 --o bind1 bind1 --as--o v4 v2 --"wdt:P177"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P18".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P2674".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end