cross join
-
[BigQuery] CROSS JOIN을 이용한 Table 열 압축, 정리데이터 분석/SQL 2022. 5. 5. 02:15
더보기 출처 : 데이터 분석을 위한 SQL 레시피 참고 : https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax?hl=ko#cross\_join CROSS JOIN cross join은 두 개의 table의 각 행들을 연결하는 쿼리이다. M개의 행을 가진 table과 N개의 행을 가진 table을 cross join 할 경우 M * N개의 행을 가진 table이 생성된다. 'quarterly_sale' table 생성 drop table if exists ch3.quarterly_sales; create table ch3.quarterly_sales( year integer, q1 integer, q2 integer, q3 ..