SELECT
  model,
  ld.fcst_init_beg,
  ld.fcst_valid_beg,
  ld.fcst_lead,
'TMP' fcst_var,
  'ME' stat_name,
  ld.total, ld.fbar, ld.obar, ld.fobar, ld.ffbar, ld.oobar, 'NA' stat_value,
  'NA' stat_ncl,
  'NA' stat_ncu,
  'NA' stat_bcl,
  'NA' stat_bcu
FROM
  stat_header h,
  line_data_sl1l2 ld
WHERE
    BINARY h.model IN ('OK_12km_PP', 'OK_1km_PP', 'OK_3km_PP')
  AND   BINARY ld.fcst_lead IN ('10000', '20000', '30000', '40000', '50000', '60000')
  AND   BINARY h.fcst_var = 'TMP'
  AND ld.stat_header_id = h.stat_header_id;

