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

Open Beginner friendly
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
clickhouse, html, sql

Research direction

Start with the aggregation in queries.sql around line 671 and compare it with the matching query in index.html around line 3685. Check the top-commented-issues result to confirm that each row's stars value is preserved rather than combined across rows, then verify both copies produce the same output.

Written by the indexing model from the issue text.

Description

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 *
-- 
Dominant language
HTML
Stars
180
Forks
19
Avg merge
3h 8m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/github-explorer

All issues in ClickHouse/github-explorer

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.