SELECT
  model,
  NOW()  fcst_init,
  NOW()  fcst_valid,
  fcst_lead,
  fcst_thr,
'WRF_precip' fcst_var,
  'CNTSUM_FSA' stat_name,
  COUNT(*) stat_value
FROM
  mode_header ,
  mode_obj_single ,
  mode_cts 
WHERE
    BINARY fcst_thr IN ('>=0.254')
  AND   BINARY model IN ('AI_step03')
  AND   BINARY fcst_lead IN ('59890000', '59900000', '59910000', '59920000', '59930000', '59940000', '59950000', '59960000', '59970000', '59980000', '59990000', '60000000')
 AND  BINARY  fcst_var = 'WRF_precip'
  AND fcst_flag = 1
  AND simple_flag = 1  AND mode_obj_single.mode_header_id = mode_header.mode_header_id
  AND mode_cts.mode_header_id = mode_obj_single.mode_header_id
  AND mode_cts.field = 'OBJECT'
GROUP BY
  fcst_lead,
  model,
  fcst_thr

SELECT
  model,
  NOW()  fcst_init,
  NOW()  fcst_valid,
  fcst_lead,
  fcst_thr,
'WRF_precip' fcst_var,
  'CNTSUM_OSA' stat_name,
  COUNT(*) stat_value
FROM
  mode_header ,
  mode_obj_single ,
  mode_cts 
WHERE
    BINARY fcst_thr IN ('>=0.254')
  AND   BINARY model IN ('AI_step03')
  AND   BINARY fcst_lead IN ('59890000', '59900000', '59910000', '59920000', '59930000', '59940000', '59950000', '59960000', '59970000', '59980000', '59990000', '60000000')
 AND  BINARY  fcst_var = 'WRF_precip'
  AND fcst_flag = 0
  AND simple_flag = 1  AND mode_obj_single.mode_header_id = mode_header.mode_header_id
  AND mode_cts.mode_header_id = mode_obj_single.mode_header_id
  AND mode_cts.field = 'OBJECT'
GROUP BY
  fcst_lead,
  model,
  fcst_thr

