SELECT
  model,
  ld.fcst_init_beg,
  ld.fcst_valid_beg,
  ld.fcst_lead,
  fcst_lev,
  vx_mask,
  obtype,
'TMP' fcst_var,
  'BCRMSE' stat_name,
  'NA' stat_value,
  ld.total,
  ld.fbar,
  ld.obar,
  ld.fobar,
  ld.ffbar,
  ld.oobar,
 ld.mae
FROM
  stat_header h,
  line_data_sl1l2 ld
WHERE
    BINARY ld.fcst_init_beg IN ('2023-07-01 18:00:00', '2023-07-02 00:00:00', '2023-07-02 06:00:00', '2023-07-02 12:00:00', '2023-07-02 18:00:00', '2023-07-03 00:00:00', '2023-07-03 06:00:00', '2023-07-03 12:00:00', '2023-07-03 18:00:00', '2023-07-04 00:00:00', '2023-07-04 06:00:00', '2023-07-04 12:00:00', '2023-07-04 18:00:00', '2023-07-05 00:00:00', '2023-07-05 06:00:00', '2023-07-05 12:00:00', '2023-07-05 18:00:00', '2023-07-06 00:00:00', '2023-07-06 06:00:00', '2023-07-06 12:00:00', '2023-07-06 18:00:00', '2023-07-07 00:00:00', '2023-07-07 06:00:00', '2023-07-07 12:00:00', '2023-07-07 18:00:00', '2023-07-08 00:00:00', '2023-07-08 06:00:00', '2023-07-08 12:00:00', '2023-07-08 18:00:00', '2023-07-09 00:00:00', '2023-07-09 06:00:00', '2023-07-09 12:00:00', '2023-07-09 18:00:00', '2023-07-10 00:00:00', '2023-07-10 06:00:00', '2023-07-10 12:00:00', '2023-07-10 18:00:00', '2023-07-11 00:00:00', '2023-07-11 06:00:00', '2023-07-11 12:00:00', '2023-07-11 18:00:00', '2023-07-12 00:00:00', '2023-07-12 06:00:00', '2023-07-12 12:00:00', '2023-07-12 18:00:00', '2023-07-13 00:00:00', '2023-07-13 06:00:00', '2023-07-13 12:00:00', '2023-07-13 18:00:00', '2023-07-14 00:00:00', '2023-07-14 06:00:00', '2023-07-14 12:00:00', '2023-07-14 18:00:00', '2023-07-15 00:00:00', '2023-07-15 06:00:00', '2023-07-15 12:00:00', '2023-07-15 18:00:00')
  AND   BINARY h.vx_mask IN ('CONUS')
  AND   BINARY ld.fcst_lead IN ('120000')
  AND   BINARY h.obtype IN ('ADPUPA')
  AND   BINARY h.model IN ('HRRR_verification_mem000', 'RRFS_verification_mem000')
  AND   BINARY h.fcst_lev IN ('P50', 'P100', 'P150', 'P200', 'P250', 'P300', 'P400', 'P500', 'P700', 'P850', 'P925', 'P1000')
  AND   BINARY h.fcst_var = 'TMP'
  AND ld.stat_header_id = h.stat_header_id;

