Skip to content

Instantly share code, notes, and snippets.

@AKB428
Created September 9, 2015 08:38
Show Gist options
  • Save AKB428/81559af46dc6b014d77a to your computer and use it in GitHub Desktop.
Save AKB428/81559af46dc6b014d77a to your computer and use it in GitHub Desktop.
CF2
SELECT
name,
title,
sum(score) as score
FROM (
SELECT
name,
title,
1 AS score,
FROM (
SELECT
name,
CASE
WHEN tweet_text CONTAINS 'Charlotte_AB_' OR tweet_text CONTAINS 'シャーロット' OR tweet_text CONTAINS 'Charlotte(シャーロット)' THEN 'シャーロット'
WHEN tweet_text CONTAINS 'gakkou_gurashi' OR tweet_text CONTAINS 'がっこうぐらし' OR tweet_text CONTAINS 'がっこうぐらし' THEN 'がっこうぐらし'
WHEN tweet_text CONTAINS 'overlord_anime' OR tweet_text CONTAINS 'オーバーロード' OR tweet_text CONTAINS 'オーバーロード' THEN 'オーバーロード'
WHEN tweet_text CONTAINS 'shimoseka' OR tweet_text CONTAINS '下ネタという概念が存在しない退屈な世界' OR tweet_text CONTAINS '下セカ' THEN '下ネタという概念が存在しない退屈な世界'
WHEN tweet_text CONTAINS 'prison_anime' OR tweet_text CONTAINS 'プリズン' OR tweet_text CONTAINS '監獄学園(プリズンスクール)' THEN 'プリズンスクール'
WHEN tweet_text CONTAINS 'gate_anime' OR tweet_text CONTAINS 'GATE 自衛隊 彼の地にて、斯く戦えり' OR tweet_text CONTAINS 'GATE' THEN 'GATE 自衛隊 彼の地にて、斯く戦えり'
ELSE NULL END AS title
FROM
[2015_C3a.2015_C7a] ) )
WHERE
title IS NOT NULL group by name, title order by name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment