解答

130

SQL文(クエリ)

WITH master AS (
  SELECT
    user_id
    , SUM(revenue) AS sum_rev
  FROM
    sample.sales
  GROUP BY
    user_id
)
SELECT
  MAX(sum_rev) AS max_sum_rev
  , MIN(sum_rev) AS min_sum_rev
  , AVG(sum_rev) AS avg_sum_rev
FROM
  master

結果テーブル

結果テーブル

サポートページに戻る