解答

135

SQL文(クエリ)

WITH master AS (
  SELECT
    CONCAT(cid, session_count) AS session_id
    , MAX(IF( page = "/cart/", 1, 0)) AS cart_reach
    , MAX(IF( page = "/thank_you/", 1, 0)) AS cv
  FROM
    sample.web_log
  GROUP BY
    session_id
)
SELECT
  SUM(cv) / SUM(cart_reach) AS cart_completion_rate
FROM
  master

結果テーブル

結果テーブル

サポートページに戻る