←back to thread

171 points vercantez | 2 comments | | HN request time: 0.539s | source
Show context
conradkay ◴[] No.44523754[source]
There's an online playground with the data here: https://play.clickhouse.com/

Wrote up this query:

  SELECT
    db_name,
    sum(if(type = 'comment', 1, 0)) AS comment_mentions,
    sum(if(type = 'story', 1, 0)) AS post_mentions,
    count(*) AS total_mentions,
    sum(score) as total_score
  FROM hackernews
  ARRAY JOIN
    extractAll(replaceAll(LOWER(text), ' ', ''), '(sqlite|postgres|mysql|mongodb|redis|clickhouse|mariadb|oracle|sqlserver|duckdb)') AS db_name
  WHERE toYear(time) >= 2022
  GROUP BY
    db_name
  ORDER BY
    post_mentions DESC;
replies(1): >>44530332 #
1. Imustaskforhelp ◴[] No.44530332[source]
Very interesting, where does the play.clickhouse get its hackernews data from though? There isn't any url link from where it fetches.

Does play.clickhouse contain all the HN data so that we can play with it?

replies(1): >>44531977 #
2. sceadu ◴[] No.44531977[source]
relevant GH issue I think

https://github.com/ClickHouse/ClickHouse/issues/29693