SELECT
  model,
  ld.fcst_init_beg,
  ld.fcst_valid_beg,
  ld.fcst_lead,
'SBTA1613_topofatmosphere' fcst_var,
  'DMAP_FBIAS' stat_name,
   beta_value,
  '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_dmap ld
WHERE
    BINARY h.model IN ('FV3_core_lsm1', 'FV3_core_mp1')
  AND   BINARY ld.fcst_lead IN ('10000', '20000')
  AND   BINARY h.fcst_var = 'SBTA1613_topofatmosphere'
  AND ld.stat_header_id = h.stat_header_id;

