query: SELECT
  # Author of a paper with a "stated as" statement for authorship
    DISTINCT ?item
  
    # Sample work by the author with that "stated as" value
    ?pub
  
    # topic of the publication
    (REPLACE(STR(?topic),".*Q","Q") AS ?topicQID)
   
    # Build URL to the Author disambiguator tool
    (CONCAT(
        '[https://tools.wmflabs.org/author-disambiguator/names_oauth.php?doit=Look+for+author&name=',
        ENCODE_FOR_URI(?authorstring), ' ',?authorstring , ']') AS ?string_resolver)
  
    # Build URL to the Author disambiguator tool
    (CONCAT(
        '[https://tools.wmflabs.org/author-disambiguator/names_oauth.php?doit=Look+for+author&filter=wdt%3AP921+wd%3A',
        ENCODE_FOR_URI(?topicQID), '%3B+wdt%3AP2093+%22', 
        ENCODE_FOR_URI(?authorstring), '%22&name=',
        ENCODE_FOR_URI(?authorstring), ' ', ?authorstring , ']') AS ?filtered_string_resolver)
  
  # Number of works with an author name string that matches the one above
    ?count
  
  WITH {
    SELECT
      (COUNT(?work) AS ?count)
      ?authorstring
      ?topic 
    WHERE {
      VALUES ?topic { wd:Q1659584 }
      ?work wdt:P2093 ?authorstring ; wdt:P921 ?topic .
    }
    GROUP BY ?authorstring ?topic
  } AS %result
  WITH {
    SELECT DISTINCT  ?authorstring ?item (SAMPLE(?work1) AS ?pub) ?count ?topic
    WHERE {
    INCLUDE %result
    ?work1 p:P50 ?author_statement ; wdt:P921 ?topic .
    ?author_statement ps:P50 ?item .
    ?author_statement pq:P1932 ?authorstring .
    }
    GROUP BY ?authorstring ?item ?pub ?count ?topic
  } AS %stateds
  WHERE {
   INCLUDE %stateds
  
  }
  ORDER BY DESC(?count)
  LIMIT 200