Created
January 20, 2018 06:26
-
-
Save vjk2005/e668ca1a4884ddb942629ebb7f49444b to your computer and use it in GitHub Desktop.
SQL for finding all book mentions on Hacker News using Google BigQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
* | |
FROM | |
[bigquery-public-data:hacker_news.full] | |
WHERE | |
type="comment" AND (REGEXP_MATCH(text,r'.*amazon.*\/\d{9}.*') OR (text like '% am reading %' OR text like '% was reading %' OR text like '% just finished %' OR text like '% finished reading %' OR text like '% just read %' OR text like '% going to read %' OR text like '% about to read %')) | |
LIMIT | |
50000 | |
// dataset and query console: https://bigquery.cloud.google.com/results/netmap-976:bquijob_5a50d154_16109c38bea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment