解答

132

SQL文(クエリ)

WITH master AS (
  SELECT
    cid
    , MAX(user_id) AS user_id2
  FROM
    sample.web_log
  GROUP BY
    cid
)
SELECT
  user_id2
  , COUNT(*) AS pageview
FROM
  sample.web_log
  JOIN master
  USING
    (cid)
GROUP BY
  user_id2
HAVING user_id2 IS NOT NULL
ORDER BY
  pageview DESC
LIMIT 3

結果テーブル

結果テーブル

サポートページに戻る