SELECT
  model,
  ld.fcst_init_beg,
  ld.fcst_valid_beg,
  ld.fcst_lead,
'APCP_24' fcst_var,
  'SEEPS_PF1' stat_name,
  IF(ld.pf1=-9999,'NA',ld.pf1 ) stat_value,
  'NA' stat_ncl,
  'NA' stat_ncu,
  'NA' stat_bcl,
  'NA' stat_bcu
FROM
  stat_header h,
  line_data_seeps ld
WHERE
    BINARY h.model IN ('FCST')
  AND   BINARY ld.fcst_valid_beg IN ('2012-04-10 12:00:00')
  AND   BINARY h.fcst_var = 'APCP_24'
  AND ld.stat_header_id = h.stat_header_id
  AND ld.pf1 != -9999;

