-- Tables required for this script are -- ANALYSISCHARLIETURNER.ages -- ANALYSISCHARLIETURNER.stages -- Right, took Charlie's ovarian cohort code, but wanted to make it a script, not a fixed table -- Ran it on av2016 and it gives exactly the same number of tumours. -- now points at av2017 and has the extra 2017 year. with tumour_cohort as ( select t.tumourid , t.diagnosisyear , nvl(te.stage_best_1901,'X') as stage_best , t.age , case when t.site_icd10_o2 in ('C577','C578','C579') then 'Non-specific site' else morph_cat_3 end as morph_cat_3 from av2017.av_tumour_england t left outer join av2017.av_tumour_experimental_england te on t.tumourid = te.tumourid left outer join analysissallyvernon.gdo_ova_tum_types_2017 tt on substr(t.site_icd10_o2,1,1) = tt.site_icd10 and nvl(t.morph_icd10_o2,8000) = tt.morph_icd10_o2 where (t.SITE_ICD10_O2_3CHAR in ('C56', 'C57') OR -- for C48, restrict to women and remove sarcomas (follows CAS-SOP 4.2 and Becca Elleray's code) (t.SITE_ICD10_O2_3CHAR in ('C48') and (t.morph_icd10_o2 not in (8693, 8800, 8801, 8802, 8803, 8804, 8805, 8806, 8810, 8963, 8990, 8991, 9040, 9041, 9042, 9043, 9044, 9490, 9500) and (t.morph_icd10_o2 not between 8811 and 8921) and (t.morph_icd10_o2 not between 9120 and 9373) and (t.morph_icd10_o2 not between 9530 and 9582) -- and sex=2 this was duplication ) OR t.SITE_ICD10_O2 in ('D391') ) ) -- standard filters and t.statusofregistration like 'F' and t.ctry_code like 'E' and t.dedup_flag=1 -- Excluding duplicates and t.age between 0 and 200 -- Sensible age and t.sex = 2 -- Sex is female for ovarian -- diagnosis year in initial range and t.diagnosisyear between 2013 and 2017 ) , statisticofinterest as (select tumourid, 1 as statisticofinterest from tumour_cohort) , tumour_cohort_linked AS ( SELECT * FROM tumour_cohort tc LEFT JOIN statisticofinterest si ON si.tumourid = tc.tumourid LEFT JOIN ANALYSISCHARLIETURNER.ages ages ON ages.AGE = tc.AGE LEFT JOIN ANALYSISCHARLIETURNER.stages stages ON stages.STAGE_BEST = tc.STAGE_BEST ) , extractpartitions as ( SELECT 'All' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked UNION ALL SELECT '2013' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2013' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2013' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2013' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2013' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2013' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2013' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2013' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2013' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2013' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2013' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2013' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2014' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2014' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2014' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2014' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2014' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2014' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2014' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2014' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2014' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2014' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2014' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2014' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2015' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2015' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2015' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2016' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2016' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2016' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2017' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2017' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR = '2017' AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2013-2015' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2013-2015' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2013-2015' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2013-2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2013-2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2013-2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2013-2015' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2013-2015' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2013-2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2013-2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2013-2015' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2013 AND 2015 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2014-2016' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2014-2016' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2014-2016' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2014-2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2014-2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2014-2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2014-2016' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2014-2016' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2014-2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2014-2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2014-2016' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2014 AND 2016 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' UNION ALL SELECT '2015-2017' AS "Year", 'All' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 00-29' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 00-29' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 30-39' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 30-39' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 40-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 40-49' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 50-59' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 60-69' UNION ALL SELECT '2015-2017' AS "Year", 'Borderline' AS "Tumour Type", 'All' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Borderline' AND SPLIT_30_TO_70 = 'Age 70+' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 00-49' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 50-59' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 60-69' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 1' AS "Stage", 'Age 70+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 1' AND SPLIT_50_TO_70 = 'Age 70+' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 2-3' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 2-3' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 00-49' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 50-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 50-59' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 60-69' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 70-79' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage 4' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage 4' AND SPLIT_50_TO_80 = 'Age 80+' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 00-59' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 00-59' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 60-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 60-69' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 70-79' UNION ALL SELECT '2015-2017' AS "Year", 'Malignant epithelial' AS "Tumour Type", 'Stage unknown' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Malignant epithelial' AND STAGE_SPLIT14 = 'Stage unknown' AND SPLIT_60_TO_80 = 'Age 80+' UNION ALL SELECT '2015-2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' UNION ALL SELECT '2015-2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 00-69' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 00-69' UNION ALL SELECT '2015-2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 70-79' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 70-79' UNION ALL SELECT '2015-2017' AS "Year", 'Miscellaneous and unspecified' AS "Tumour Type", 'All' AS "Stage", 'Age 80+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Miscellaneous and unspecified' AND SPLIT_70_80 = 'Age 80+' UNION ALL SELECT '2015-2017' AS "Year", 'Non-specific site' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Non-specific site' UNION ALL SELECT '2015-2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'All' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' UNION ALL SELECT '2015-2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 00-49' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 00-49' UNION ALL SELECT '2015-2017' AS "Year", 'Sex cord-stromal and germ cell' AS "Tumour Type", 'All' AS "Stage", 'Age 50+' AS "Age", SUM(statisticofinterest) as Incidence FROM tumour_cohort_linked WHERE DIAGNOSISYEAR BETWEEN 2015 AND 2017 AND MORPH_CAT_3 = 'Sex cord-stromal and germ cell' AND SPLIT_50 = 'Age 50+' ) , lsoatoregionlookup as ( select distinct lsoa11, nhser17nm as Region from nspl_201805 left outer join ANALYSISNCR.CCG18_NHSER17_18_LKP_DATALAKE nr on nspl_201805.ccg = nr.ccgapr18cd where substr(lsoa11,1,1) = 'E' ) , lsoatoalllookup as ( select distinct lsoa11, 'All' as Region from nspl_201805 where substr(lsoa11,1,1) = 'E' ) , geoglookup as (select * from lsoatoregionlookup union select * from lsoatoalllookup) /* reminding myself how dual works: select rownum from dual; select rownum from dual -- LAST YEAR NEEDED connect by level <= 3; */ ,sexlookup as ( select 1 as basesex, '1' as sex from dual union select 2 as basesex, '2' as sex from dual union select 1 as basesex, 'All' as sex from dual union select 2 as basesex, 'All' as sex from dual ) -- year look up -- This is hacky, there must be a better way? -- But it does produce a look up table for 2013-2017 -- and also the three year rolling groups for 2013-2017 ,yearlookup as ( select n as baseyear , to_char(n) as year from ( select rownum n from dual -- LAST YEAR NEEDED connect by level <= 2017 ) -- FIRST YEAR NEEDED where n >= 2013 UNION select n as baseyear , '2013-2015' as year from ( select rownum n from dual -- LAST YEAR NEEDED connect by level <= 2015 ) -- FIRST YEAR NEEDED where n >= 2013 UNION select n as baseyear , '2014-2016' as year from ( select rownum n from dual -- LAST YEAR NEEDED connect by level <= 2016 ) -- FIRST YEAR NEEDED where n >= 2014 UNION select n as baseyear , '2015-2017' as year from ( select rownum n from dual -- LAST YEAR NEEDED connect by level <= 2017 ) -- FIRST YEAR NEEDED where n >= 2015 ) -- Making age lookup. --select * from analysischarlieturner.ages; -- We don't have a systematic 'we definitely used this age partition' -- So we should assume any age partition in the age table could be being used. -- There are currently 30 age partitions. -- This is a bit tedious. -- You can at least get a list of them: /* select COLUMN_NAME from ALL_TAB_COLUMNS where owner = 'ANALYSISCHARLIETURNER' and TABLE_NAME = 'AGES' order by COLUMN_NAME; */ -- If I had grip, I would write some R to automate creating this table -- Instead I did it in Excel , agelookup as ( select distinct floor(AGES.AGE/5)+1 as baseage, 'All' as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_20_30_50_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_20_40 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_20_50_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_20_50_70_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_20_TO_40 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_25 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_25_50 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30_50 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30_50_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30_50_70_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30_TO_50 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_30_TO_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_35 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_40 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_40_TO_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_50 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_50_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_50_70_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_50_TO_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_50_TO_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_5_10_20_30_50_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_60_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_60_70_75_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_60_TO_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_70 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_70_75_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_70_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, SPLIT_80 as age from analysischarlieturner.ages UNION select distinct floor(AGES.AGE/5)+1 as baseage, TENYEARAGE as age from analysischarlieturner.ages) -- So, I have a region lookup, a sex lookup, a year lookup, and an age lookup. -- And some populations! Yay. Now just join them all together. -- We have no joins for the Welsh LSOAs and for the years before 2013. -- But that is what we wanted -- All ages and sexs have joined to something. , population_table as ( select g.region, s.sex, y.year, a.age, sum(popcount) as popcount from ons2017.populations_normalised POPS left outer join geoglookup g on pops.lsoa11 = g.lsoa11 left outer join sexlookup s on pops.sex = s.basesex left outer join yearlookup y on pops.year = y.baseyear left outer join agelookup a on pops.quinaryagegroupint = a.baseage group by g.region, s.sex, y.year, a.age ) select 'Ovary, fallopian tube and primary peritoneal carcinomas' as "Cancer Site" ,"Year" as "Year" ,"Tumour Type" as "Tumour Type" , "Stage" as "Stage" , case when "Age" = 'All' then 'All ages' else "Age" end as "Age" -- Region doesn't work, you need "Region" now. Odd odd odd , 'All England' as "Region" , 'Female' as "Sex" , 'Not split by grade' as "Grade" , 'Not split by nodal status' as "Nodal Status" , Incidence as "Incidence" , pops.popcount as "Population" from extractpartitions ep left outer join population_table pops on ep."Year" = pops.year -- This is a hack because North Of is not North of and ep."Age" = pops.age where pops.sex = '2' and pops.region = 'All' ;