解答

165

SQL文(クエリ)

SELECT
  SUM(quantity) AS sum_qty_over_avg_rev
FROM
  sample.sales
WHERE
  revenue > (
    SELECT
      AVG(revenue) AS avg_rev
    FROM
      sample.sales where is_proper IS TRUE
  )
AND is_proper IS TRUE

結果テーブル

結果テーブル

サポートページに戻る