Skip to content

Instantly share code, notes, and snippets.

@orsonadams
Last active March 30, 2018 20:31
Show Gist options
  • Save orsonadams/6c5586885e5366ad4396592c5e8e9edd to your computer and use it in GitHub Desktop.
Save orsonadams/6c5586885e5366ad4396592c5e8e9edd to your computer and use it in GitHub Desktop.
Query news sites submission to hacker news
SELECT
title, timestamp, score, url
FROM
[bigquery-public-data.hacker_news.full]
WHERE
(REGEXP_MATCH(url,r'nytimes.com|cnn.com|hufftingtonpost.com|usatoday.com|reuters.com|politico.com|yahoo.com
|npr.org|latimes.com|nbcnews.com|cbsnews.com|nypost.com|abcnews.com|breitbart.com|theonion.com
|newsmax.com|washingtontimes.com|newsweek.com|observer.com|chicago.suntimes.com|theguardian.com
|buzzfeed.com|wjs.com|abcnews.go.com|news.bbc.co.uk|usatoday.com|bloomberg.com|news.google.com'))
AND deleted IS null AND type='story'
ORDER BY timestamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment