SELECT
  model,
  ld.fcst_init_beg,
  ld.fcst_valid_beg,
  ld.fcst_lead,
  fcst_thresh,
  obtype,
  vx_mask,
'APCP_03' fcst_var,
  'GSS' stat_name,
  'NA' stat_value,
  ld.total,
  ld.fy_oy,
  ld.fy_on,
  ld.fn_oy,
  ld.fn_on,
  ld.ec_value 
FROM
  stat_header h,
  line_data_ctc ld
WHERE
    BINARY h.fcst_thresh IN ('>=2.54')
  AND   BINARY h.obtype IN ('CCPA')
  AND   BINARY h.vx_mask IN ('MASK')
  AND   BINARY h.model IN ('HRRR_mem000', 'NSSL-MPAS-HN_mem000', 'NSSL-MPAS-HT_mem000', 'NSSL-MPAS-RT_mem000', 'RRFS_mem000')
  AND   BINARY ld.fcst_lead IN ('30000', '60000', '90000', '120000', '150000', '180000', '210000', '240000', '270000', '300000', '330000', '360000', '390000', '420000', '450000', '480000')
  AND   BINARY h.fcst_var = 'APCP_03'
  AND ld.stat_header_id = h.stat_header_id;

