github-explorer icon indicating copy to clipboard operation
github-explorer copied to clipboard

Fix for "Top commented issues for each of the top repositories"

Open wpdevelopment11 opened this issue 7 months ago • 0 comments

I think sum is wrong here. Each row contains the total number of stars.

---
 index.html  | 2 +-
 queries.sql | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index a1b6343..03af266 100644
--- a/index.html
+++ b/index.html
@@ -3685,7 +3685,7 @@ LIMIT 50</span>
     max(comments),
     argMax(authors, comments) AS authors,
     argMax(number, comments) AS number,
-    sum(stars) AS stars
+    any(stars) AS stars
 FROM
 (
     SELECT *
diff --git a/queries.sql b/queries.sql
index 938e358..e7c13a6 100644
--- a/queries.sql
+++ b/queries.sql
@@ -671,7 +671,7 @@ SELECT
  max(comments),
  argMax(authors, comments) AS authors,
  argMax(number, comments) AS number,
- sum(stars) AS stars
+ any(stars) AS stars
 FROM
 (
  SELECT *
-- 

wpdevelopment11 avatar Jun 10 '25 20:06 wpdevelopment11