query: SELECT
    ?item
    ?coauthorstring
    ?sample_work
  # Number of works with the coauthor
    ?count
  
    (CONCAT( "[https://tools.wmflabs.org/author-disambiguator/?doit=Look+for+author&name=", 
            ENCODE_FOR_URI(?coauthorstring ), "&filter=wdt%3AP50+wd%3A", ?qid , " 𝄘]") AS ?missing)
  WHERE {
    SELECT DISTINCT ?coauthorstring
                    (COUNT(DISTINCT ?work) as ?count) 
                    (SAMPLE(?coauthor1) AS ?item) 
                    (REPLACE(STR(?item), ".*Q", "Q") AS ?qid)
                    (SAMPLE(?work) AS ?sample_work) 
                                                      WHERE {
      { ?coauthor1 wdt:P108 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor1 wdt:P463 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor1 wdt:P1416 / wdt:P361* wd:Q213439 .}
  
      { ?coauthor2 wdt:P108 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor2 wdt:P463 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor2 wdt:P1416 / wdt:P361* wd:Q213439 .}
  
      { ?coauthor3 wdt:P108 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor3 wdt:P463 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor3 wdt:P1416 / wdt:P361* wd:Q213439 .}
  
      { ?coauthor4 wdt:P108 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor4 wdt:P463 / wdt:P361* wd:Q213439 .}
      UNION
      { ?coauthor4 wdt:P1416 / wdt:P361* wd:Q213439 .}
  
      ?work wdt:P50 ?coauthor1 ; wdt:P50 ?coauthor2 ; wdt:P50 ?coauthor3 ; wdt:P50 ?coauthor4 ; 
            wdt:P2093 ?coauthorstring.
      FILTER (?coauthor1 != ?coauthor2 )
      FILTER (?coauthor1 != ?coauthor3 )
      FILTER (?coauthor1 != ?coauthor4 )
      FILTER (?coauthor2 != ?coauthor3 )
      FILTER (?coauthor2 != ?coauthor4 )
      FILTER (?coauthor3 != ?coauthor4 )
  
    }
    GROUP BY ?item
             ?coauthorstring
             ?sample_work
             ?count #?item ?qid
             
  #  HAVING (?count > 0)
  #           LIMIT 2000
  }
  ORDER BY DESC(?count) 
  LIMIT 1000