# of unique reddit accounts per day commenting “OK boomer”

“OK Boomer” escalated quickly — a reddit+BigQuery report

Felipe Hoffa
5 min readNov 9, 2019

--

“OK boomer” growth by subreddit:

# of unique accounts per sub that have commented “OK Boomer”

The first “OK boomer”

The first tweet for “Ok Boomer”. Source: Know Your Meme
An “OK boomer” on reddit, 90 minutes before that first tweet.
“OK boomer” reddit prehistory: 9 comments between 2009 and April 12, 2018
Waiting from April 2018 until October 2018 to find an almost daily dose of “OK Boomer” on reddit.
The embrace of “OK boomer” from Aug 2018 to Jun 2019 on reddit.
October 30, 2019: 2,640 accounts post “OK boomer” on reddit
Play with the interactive report, or load it full size.

How-to

CREATE TABLE `reddit_extracts.201906_all_okboomer`
PARTITION BY fake_date
CLUSTER BY subreddit, ts
AS
SELECT TIMESTAMP_SECONDS(created_utc) ts, *, DATE('2000-01-01') fake_date
FROM `reddit_comments.2*`
WHERE REGEXP_CONTAINS(body, r'(?i)\bok boomer')
AND _table_suffix >= '018_03'
;
INSERT INTO `reddit_extracts.201906_okboomer_all`
SELECT TIMESTAMP_SECONDS(created_utc) ts, *, DATE('2000-01-01') fake_date
FROM `reddit_comments.2*`
WHERE REGEXP_CONTAINS(body, r'(?i)\bok boomer')
AND _table_suffix BETWEEN '0' AND '018_02'
CREATE OR REPLACE TABLE `reddit_extracts.201911_okboomer_day`
AS
WITH data AS (
SELECT ts, author, subreddit, score, body
, permalink
FROM `reddit_extracts.201910_live_okboomer`
UNION ALL
SELECT ts, author, subreddit, score, body
, CONCAT('/r/',subreddit,'/comments/', REGEXP_REPLACE(link_id, 't3_', ''), '//', id, '/') permalink
FROM `reddit_extracts.201906_okboomer_all`
)
SELECT day, authors
, (SELECT STRING_AGG(value, ', ') FROM UNNEST(top_reddit)) top_subs
, top_comm
FROM (
SELECT TIMESTAMP_TRUNC(ts, DAY) day, COUNT(DISTINCT author) authors
, APPROX_TOP_COUNT(subreddit, 3) top_reddit
, ARRAY_AGG(STRUCT(score, subreddit, permalink, body) ORDER BY score DESC LIMIT 1)[OFFSET(0)] top_comm
FROM data
WHERE body NOT IN ('[deleted]', '[removed]')
AND REGEXP_CONTAINS(body, r'(?i)\bok boomer[s]?\b')
AND ts < TIMESTAMP_TRUNC(CURRENT_TIMESTAMP(), DAY)
GROUP BY 1
)
ORDER BY 1 DESC

The animated chart

CREATE OR REPLACE TABLE `reddit_extracts.201911_okboomer_subgrowth`
AS
WITH data AS (
SELECT ts, author, subreddit, score, body
, permalink
FROM `reddit_extracts.201910_live_okboomer`
UNION ALL
SELECT ts, author, subreddit, score, body
, CONCAT('/r/',subreddit,'/comments/', REGEXP_REPLACE(link_id, 't3_', ''), '//', id, '/') permalink
FROM `reddit_extracts.201906_okboomer_all`
)
, sketches AS (
SELECT TIMESTAMP_TRUNC(ts, DAY) day
, subreddit
, HLL_COUNT.INIT(author) sketch
, COUNT(DISTINCT author) authors
FROM data
WHERE body NOT IN ('[deleted]', '[removed]')
AND REGEXP_CONTAINS(body, r'(?i)\bok boomer[s]?\b')
GROUP BY 1,2
), notable_early AS (
SELECT DISTINCT subreddit
FROM data
WHERE ts < '2018-04-15'
), overall_notable AS (
SELECT subreddit, COUNT(DISTINCT author) c
FROM data
GROUP BY 1
ORDER BY c DESC
LIMIT 30
)
SELECT *
FROM (
SELECT *, IFNULL(authors - LAG(authors) OVER(PARTITION BY subreddit ORDER BY day), authors) authors_diff
FROM (
SELECT a.day
, CASE
WHEN subreddit IN (SELECT * from notable_early UNION ALL (SELECT subreddit from overall_notable)) THEN subreddit
-- ELSE '[other]'
END AS subreddit
, COUNT(*) c, HLL_COUNT.MERGE(sketch) authors
FROM (
SELECT DISTINCT CASE
WHEN day< '2019-07-01' THEN TIMESTAMP_TRUNC(day, QUARTER)
WHEN day< '2019-09-01' THEN TIMESTAMP_TRUNC(day, MONTH)
WHEN day< '2019-10-30' THEN TIMESTAMP_TRUNC(day, WEEK)
ELSE day
END AS day
FROM sketches) a
JOIN sketches b
ON b.day<=a.day
GROUP BY 1,2
)
)
WHERE subreddit IS NOT null

Want more?

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Felipe Hoffa
Felipe Hoffa

Written by Felipe Hoffa

Developer Advocate around the data world. Ex-Google BigQuery, Ex-Snowflake, Always Felipe

Responses (1)