解答
128
SQL文(クエリ)
WITH master AS ( SELECT * FROM sample.sales LEFT JOIN sample.products USING (product_id) ) SELECT product_category , SUM(quantity) AS sum_qty , SUM(revenue) AS sum_rev FROM master GROUP BY 1 ORDER BY 3 DESC
『集中演習 SQL入門 Google BigQueryではじめるビジネスデータ分析(できるDigital Camp)』の読者のみなさまに向け、演習ドリルの解答128を公開しています。
解答
WITH master AS ( SELECT * FROM sample.sales LEFT JOIN sample.products USING (product_id) ) SELECT product_category , SUM(quantity) AS sum_qty , SUM(revenue) AS sum_rev FROM master GROUP BY 1 ORDER BY 3 DESC
この記事が気に入ったら
いいね!しよう
できるネットから最新の記事をお届けします。