Article Outline
挑戦
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] ADVANCE
[BIGQUERY] ML
[BIGQUERY] DS
■ DS100ノック
■
[BIGQUERY] GA
|| データサイエンス100本ノック(構造化データ加工編) SQL編
| 各テーブル確認
-- 各テーブルのデータ数確認
select
*
from(
select
'category' as tb_name
, (select count(*) from `prj-test3.100knocks.category`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'category'
union all
select
'customer' as tb_name
, (select count(*) from `prj-test3.100knocks.customer`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'customer'
union all
select
'geocode' as tb_name
, (select count(*) from `prj-test3.100knocks.geocode`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'geocode'
union all
select
'product' as tb_name
, (select count(*) from `prj-test3.100knocks.product`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'product'
union all
select
'receipt' as tb_name
, (select count(*) from `prj-test3.100knocks.receipt`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'receipt'
union all
select
'store' as tb_name
, (select count(*) from `prj-test3.100knocks.store`) as reco
, count(*) as col
from `prj-test3.100knocks.INFORMATION_SCHEMA.COLUMNS`
where table_name = 'store'
)
order by reco desc
;