query-34065fef3a501d8aa4f750797480b97e

rq turtle/ttl

Network of co-players 16:45, 31 August 2022 (UTC)) talk (Cavernia. However, replacing the property is not enough as the authors are listed in items of the scientific articles, while teams are listed in the athlete items. How do I change the query then? --(P54)member of sports team most often played together with in other teams by using (Q215944)Tore André Flo to show which co-authors a researcher has published most often together with. I'd like to do the same with athletes, i.e. I want to show the co-players queryFrom Scholia, there is a nice 19:19, 31 August 2022 (UTC)) talk (Dipsacus fullonum in 1999, so they never played together on the team. The request doesn't makes sense to me, but I can make query counting that as a connection tomorrow. It is too late for me now. --(Q1422)Juventus FC played for (Q45901)Thierry Henry in 2005-2006 while (Q1422)Juventus FC played for (Q46347)Patrick Vieira But 18:55, 31 August 2022 (UTC)) talk (Cavernia. Then they have three connections, but maybe he has even more connections to other players? --(Q45901)Thierry Henry , so did (Q47774)France national association football team and (Q1422)Juventus FC , (Q9617)Arsenal F.C. played for (Q46347)Patrick Vieira Sorry, wrong paste, corrected now. Example: 18:07, 31 August 2022 (UTC)) talk (Dipsacus fullonumPS. A guess could be to use time qualifiers to list who were longest at the same teams at the same time - but that wouldn't tell if they actually played together. -- 18:01, 31 August 2022 (UTC)) talk (Dipsacus fullonum: I don't understand what it is you are asking about. It doesn't help that query you're linking to doesn't show which co-authors a researcher has published most often together with, but instead shows which other affiliations items with a certain affiliation also have. Please explain again. I don't see how to tell how often someone has played with others by using P54. --Cavernia@: Here is as promised a query. Is it what you wanted? Cavernia @

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?coplayer ?coplayerLabel (COUNT(?team) AS ?teamCount) (GROUP_CONCAT(?teamLabel; separator=", ") AS ?teams) 
{
  VALUES ?player { wd:Q215944 }
  ?player wdt:P54 ?team .
  ?coplayer wdt:P54 ?team .
  FILTER (?coplayer != ?player)
  SERVICE wikibase:label
  {
    bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
    ?coplayer rdfs:label ?coplayerLabel .
    ?team rdfs:label ?teamLabel .
  }  
}
GROUP BY ?coplayer ?coplayerLabel
HAVING (?teamCount >= 3)
ORDER BY DESC(?teamCount)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?coplayer"):::projected v5("?coplayerLabel"):::projected v4("?player") v4("?team"):::projected v7("?teamCount") v6("?teamLabel"):::projected v7("?teams") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?teamCount >= '3^^xsd:integer'"]] f0 --> v7 f1[["?coplayer != ?player"]] f1 --> v2 f1 --> v4 bind2[/VALUES ?player/] bind2-->v4 bind20(["wd:Q215944"]) bind20 --> bind2 v4 --"wdt:P54"--> v4 v2 --"wdt:P54"--> v4 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 v2 --"rdfs:label"--> v5 v4 --"rdfs:label"--> v6 end bind5[/"count(?team)"/] v4 --o bind5 bind5 --as--o v7 bind6[/"?teamLabel"/] v6 --o bind6 bind6 --as--o v7