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
-- 1.1 チュートリアルファンネル(All) -- | |
td query -w -f csv -d your_app -o tutorial_all.csv " | |
SELECT | |
t2.step AS step, | |
cnt, | |
prev_cnt, | |
ROUND(cnt/enter_cnt*100) AS rate_from_enter, | |
IF(prev_cnt IS NULL, 100,ROUND(cnt/prev_cnt*100)) AS rate_from_prev, | |
IF(prev_cnt IS NULL, 0,ROUND((prev_cnt-cnt)/prev_cnt*100)) AS normed_rate_from_enter | |
FROM |
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
-- 0.1 ログインインターバルの分布 -- | |
-- 当日入会->辞めた人もインターバルは1となるので1回以上プレイしている人に限定 -- | |
td query -w -d your_app -f csv -o dist_of_login_interval.csv " | |
SELECT ROUND((datediff(latest_login, registered_day)+1)/login_times) AS login_interval, COUNT(*) AS cnt | |
FROM | |
( | |
SELECT v['uid'] AS uid, from_unixtime(MAX(time),'yyyy-MM-dd' ) AS latest_login | |
FROM login | |
GROUP BY v['uid'] | |
) t1 |
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
# Add Cloudera repositories | |
sudo sh -c 'echo "deb http://archive.cloudera.com/debian `lsb_release -c -s`-cdh3 contrib" > /etc/apt/sources.list.d/cloudera.list' | |
sudo sh -c 'echo "deb-src http://archive.cloudera.com/debian `lsb_release -c -s`-cdh3 contrib" >> /etc/apt/sources.list.d/cloudera.list' | |
wget -q -O - http://archive.cloudera.com/debian/archive.key | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y install hadoop | |
# Install Hue | |
sudo apt-get -y install hadoop-0.20-conf-pseudo-hue |
NewerOlder