-- DBMS: snowflake
create or replace TABLE CLINICAL_GDC_R39 (
	"submitter_id" VARCHAR(16777216),
	"case_id" VARCHAR(16777216),
	"diag__treat__count" NUMBER(38,0),
	"primary_site" VARCHAR(16777216),
	"disease_type" VARCHAR(16777216),
	"proj__name" VARCHAR(16777216),
	"proj__project_id" VARCHAR(16777216),
	"demo__demographic_id" VARCHAR(16777216),
	"demo__gender" VARCHAR(16777216),
	"demo__race" VARCHAR(16777216),
	"demo__ethnicity" VARCHAR(16777216),
	"demo__vital_status" VARCHAR(16777216),
	"demo__days_to_birth" NUMBER(38,0),
	"demo__year_of_birth" NUMBER(38,0),
	"demo__age_at_index" NUMBER(38,0),
	"demo__year_of_death" NUMBER(38,0),
	"demo__days_to_death" NUMBER(38,0),
	"demo__state" VARCHAR(16777216),
	"demo__created_datetime" NUMBER(38,0),
	"demo__updated_datetime" NUMBER(38,0),
	"exp__exposure_id" VARCHAR(16777216),
	"exp__years_smoked" NUMBER(38,0),
	"exp__pack_years_smoked" FLOAT,
	"exp__cigarettes_per_day" FLOAT,
	"exp__alcohol_history" BOOLEAN,
	"exp__state" VARCHAR(16777216),
	"exp__created_datetime" NUMBER(38,0),
	"exp__updated_datetime" NUMBER(38,0),
	"diag__diagnosis_id" VARCHAR(16777216),
	"diag__ajcc_clinical_n" VARCHAR(16777216),
	"diag__masaoka_stage" VARCHAR(16777216),
	"diag__ajcc_clinical_m" VARCHAR(16777216),
	"diag__primary_diagnosis" VARCHAR(16777216),
	"diag__primary_gleason_grade" VARCHAR(16777216),
	"diag__year_of_diagnosis" NUMBER(38,0),
	"diag__figo_stage" VARCHAR(16777216),
	"diag__days_to_diagnosis" NUMBER(38,0),
	"diag__ajcc_pathologic_m" VARCHAR(16777216),
	"diag__site_of_resection_or_biopsy" VARCHAR(16777216),
	"diag__ajcc_staging_system_edition" VARCHAR(16777216),
	"diag__icd_10_code" VARCHAR(16777216),
	"diag__age_at_diagnosis" NUMBER(38,0),
	"diag__ajcc_clinical_t" VARCHAR(16777216),
	"diag__days_to_last_follow_up" NUMBER(38,0),
	"diag__ajcc_pathologic_stage" VARCHAR(16777216),
	"diag__ann_arbor_extranodal_involvement" BOOLEAN,
	"diag__ajcc_clinical_stage" VARCHAR(16777216),
	"diag__secondary_gleason_grade" VARCHAR(16777216),
	"diag__synchronous_malignancy" BOOLEAN,
	"diag__morphology" VARCHAR(16777216),
	"diag__ajcc_pathologic_t" VARCHAR(16777216),
	"diag__igcccg_stage" VARCHAR(16777216),
	"diag__ann_arbor_clinical_stage" VARCHAR(16777216),
	"diag__ann_arbor_b_symptoms" BOOLEAN,
	"diag__prior_treatment" BOOLEAN,
	"diag__ajcc_pathologic_n" VARCHAR(16777216),
	"diag__tissue_or_organ_of_origin" VARCHAR(16777216),
	"diag__prior_malignancy" BOOLEAN,
	"diag__state" VARCHAR(16777216),
	"diag__created_datetime" NUMBER(38,0),
	"diag__updated_datetime" NUMBER(38,0),
	"state" VARCHAR(16777216),
	"created_datetime" NUMBER(38,0),
	"updated_datetime" NUMBER(38,0)
);

INSERT INTO "TCGA_MITELMAN"."TCGA_VERSIONED"."CLINICAL_GDC_R39" (submitter_id, diag__ann_arbor_clinical_stage, diag__ajcc_staging_system_edition, diag__prior_treatment, exp__state, diag__icd_10_code, demo__days_to_birth, proj__project_id, diag__year_of_diagnosis, diag__ajcc_pathologic_t, demo__gender, demo__year_of_death, diag__primary_diagnosis, diag__site_of_resection_or_biopsy, demo__race, diag__state, diag__ann_arbor_b_symptoms, demo__demographic_id, proj__name, case_id, diag__prior_malignancy, diag__diagnosis_id, demo__updated_datetime, created_datetime, exp__updated_datetime, exp__created_datetime, diag__ajcc_pathologic_m, demo__created_datetime, exp__years_smoked, diag__age_at_diagnosis, demo__state, diag__igcccg_stage, diag__treat__count, diag__tissue_or_organ_of_origin, diag__morphology, demo__ethnicity, exp__alcohol_history, diag__secondary_gleason_grade, disease_type, exp__cigarettes_per_day, demo__age_at_index, diag__masaoka_stage, diag__updated_datetime, diag__ajcc_pathologic_stage, exp__pack_years_smoked, diag__ajcc_clinical_t, diag__synchronous_malignancy, diag__ajcc_clinical_n, diag__ajcc_clinical_m, updated_datetime, demo__vital_status, diag__figo_stage, diag__days_to_last_follow_up, diag__created_datetime, primary_site, diag__primary_gleason_grade, diag__days_to_diagnosis, diag__ajcc_clinical_stage, diag__ajcc_pathologic_n, demo__days_to_death, demo__year_of_birth, diag__ann_arbor_extranodal_involvement, exp__exposure_id, state) VALUES ('TCGA-17-Z008', NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-LUAD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lung Adenocarcinoma', '631dbd88-fc3e-4ed8-b4a7-2da137a49a11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'Adenomas and Adenocarcinomas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1556730373818117, NULL, NULL, NULL, NULL, 'Bronchus and lung', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'released'), ('TCGA-17-Z013', NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-LUAD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lung Adenocarcinoma', 'a19d84a1-b316-44d3-90b1-0d14b0fd7a14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'Adenomas and Adenocarcinomas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1556730373818117, NULL, NULL, NULL, NULL, 'Bronchus and lung', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'released'), ('TCGA-17-Z009', NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-LUAD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lung Adenocarcinoma', '3136b041-24b9-42c5-b4a8-70f04c63a177', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'Adenomas and Adenocarcinomas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1556730373818117, NULL, NULL, NULL, NULL, 'Bronchus and lung', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'released'), ('TCGA-17-Z003', NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-LUAD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Lung Adenocarcinoma', 'c390b6ad-14c8-49ea-9b38-798c9fad5b62', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'Adenomas and Adenocarcinomas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1556730373818117, NULL, NULL, NULL, NULL, 'Bronchus and lung', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'released'), ('TCGA-5M-AAT5', NULL, NULL, NULL, NULL, NULL, NULL, 'TCGA-COAD', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Colon Adenocarcinoma', '515a062e-f68e-4100-a923-bd2ce0bbe071', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'Adenomas and Adenocarcinomas', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1556729377062924, NULL, NULL, NULL, NULL, 'Colon', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'released');