Skip to content

Instantly share code, notes, and snippets.

@sinmetal
Created February 5, 2015 02:16
Show Gist options
  • Save sinmetal/cf02af5eb0fa595318e3 to your computer and use it in GitHub Desktop.
Save sinmetal/cf02af5eb0fa595318e3 to your computer and use it in GitHub Desktop.
Tweetを適当にためたBigQueryのTableから、恵方巻関連のつぶやきを拾ったもの。
SELECT
year, month, day,
count(text) AS count
FROM
(
SELECT
YEAR(DATE_ADD (createdAt, 9, "HOUR")) AS year,
MONTH(DATE_ADD (createdAt, 9, "HOUR")) AS month,
DAY(DATE_ADD (createdAt, 9, "HOUR")) AS day,
text
FROM [gcpdemo.Tweet]
WHERE text CONTAINS "恵方巻"
)
GROUP BY
year, month, day
ORDER BY
year, month, day
LIMIT 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment