Article Outline
分析入門 - Section12
TOC
Collection Outline
[BIGQUERY] 分析入門
[BIGQUERY] SQL
■ 関数
- approx_count_distinct()
- coalesce()
- countif()
- extract()
- ifnull()
- lead() / lag()
- left() / right()
- lower()
- nullif()
- parse_date()
- percentile_()
- row_number()
- safe_cast()
- split()
- st_distance()
- struct()
- unnest()
■ 演算子
■ 句(節)
■ BigQuery特有
■ ERROR
- To copy a table, the destination and source datasets must be in the same region. Copy an entire dataset to move data between regions.
- Resources exceeded during query execution: Not enough resources for query planning - too many subqueries or query is too complex
[BIGQUERY] ML
[BIGQUERY] DS
■ DS100ノック
■
[BIGQUERY] GA
● Section12 : おまけ(可視化)
これまでのsectionで学んできたデータを、
テーブルデータとしてではなく視覚的に伝えやすくする方法が可視化です。
- SQLをBigQueryに書く。
SELECT
sp.year_month,
sm.shop_name,
sp.ttl_sales
FROM
(SELECT
DATE_TRUNC(date, MONTH) AS year_month,
shop_id,
SUM(sales_amount) AS ttl_sales
FROM `prj-test3.bq_sample.shop_purchases`
GROUP BY date, shop_id) AS sp
LEFT JOIN `prj-test3.bq_sample.shops_master` AS sm
USING(shop_id)
;
BigQuery上で、求めたいデータを抽出する。
表示画面の上部のナビゲーションから、「データを探索」をプルダウン。 そのまま、データポータルへ遷移。
Google DataPortal
よかったら以下にリンクを貼っておきますので、覗いてみてください。 こんな感じにお洒落になりました。