query-a1271dbf32f119b4d74fcf9fe5e6eec8

rq turtle/ttl

SELECT ?item ?sport ?occupation ?field { SELECT ?sport (COUNT(?sport) AS ?cnt) { ?item wdt:P641 ?sport . ?item wdt:P106 ?occupation . ?occupation (wdt:P279)* wd:Q2066131 . ?occupation wdt:P425 ?field . FILTER(?field != ?sport) . } GROUP BY ?sport ORDER BY DESC(?cnt)

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#SELECT ?item ?sport ?occupation ?field {
SELECT ?sport (COUNT(?sport) AS ?cnt) {
  ?item wdt:P641 ?sport .
  ?item wdt:P106 ?occupation .
  ?occupation (wdt:P279)* wd:Q2066131 .
  ?occupation wdt:P425 ?field .
  FILTER(?field != ?sport) .
} GROUP BY ?sport ORDER BY DESC(?cnt)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?cnt") v2("?field") v4("?item") v5("?occupation") v3("?sport"):::projected c4(["wd:Q2066131"]):::iri f0[["?field != ?sport"]] f0 --> v2 f0 --> v3 v4 --"wdt:P641"--> v3 v4 --"wdt:P106"--> v5 v5 --"wdt:P279"--> c4 v5 --"wdt:P425"--> v2 bind2[/"count(?sport)"/] v3 --o bind2 bind2 --as--o v6