8
8
9
9
# (1) ProlificCommenters
10
10
prolific_commenters_query = """
11
- SELECT author, COUNT(id) AS NumPosts
12
- FROM `bigquery-public-data.hacker_news.comments `
11
+ SELECT `by` AS author, COUNT(id) AS NumPosts
12
+ FROM `bigquery-public-data.hacker_news.full `
13
13
GROUP BY author
14
14
HAVING COUNT(id) > 10000
15
15
"""
19
19
# (2) NumDeletedPosts
20
20
deleted_posts_query = """
21
21
SELECT COUNT(1) AS num_deleted_posts
22
- FROM `bigquery-public-data.hacker_news.comments `
22
+ FROM `bigquery-public-data.hacker_news.full `
23
23
WHERE deleted = True
24
24
"""
25
25
query_job = client .query (deleted_posts_query )
@@ -46,8 +46,8 @@ def check(self, results):
46
46
_solution = CS (\
47
47
"""
48
48
prolific_commenters_query = \" ""
49
- SELECT author, COUNT(1) AS NumPosts
50
- FROM `bigquery-public-data.hacker_news.comments `
49
+ SELECT `by` AS author, COUNT(1) AS NumPosts
50
+ FROM `bigquery-public-data.hacker_news.full `
51
51
GROUP BY author
52
52
HAVING COUNT(1) > 10000
53
53
\" ""
@@ -62,7 +62,7 @@ class NumDeletedPosts(EqualityCheckProblem):
62
62
# Query to determine how many posts were deleted
63
63
deleted_posts_query = \" ""
64
64
SELECT COUNT(1) AS num_deleted_posts
65
- FROM `bigquery-public-data.hacker_news.comments `
65
+ FROM `bigquery-public-data.hacker_news.full `
66
66
WHERE deleted = True
67
67
\" ""
68
68
0 commit comments