*トレジャーデータはデータ収集、保存、分析のためのエンドツーエンドでサポートされたクラウドサービスです。 データサイエンティストのためのHiveQL分析クエリテンプレートシリーズ: その1, その2, その3, その4, その5, その6 E. リテンション分析 最後はリテンションに関するクエリテンプレートです。 パターン E-1:直帰率 ※ ここでは同日内に1回しかログインしなかったユーザーを「直帰」と見なします。 SELECT t2.d AS d, COUNT(1)/SUM(t2.cnt)*100 AS bounce_rate FROM ( SELECT TD_TIME_FORMAT(time, 'yyyy-MM-dd', 'JST') AS d, uid, COUNT(1) AS cnt FROM login GROUP BY TD_TIME_FORMAT(time, 'yyyy-M