query-34065fef3a501d8aa4f750797480b97e
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
- https://query.wikidata.org/sparql
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)