SELECT
  model,
  NOW()  fcst_init,
  fcst_valid,
  fcst_lead,
'APCP_03' fcst_var,
  'CNT_AAA' stat_name,
  COUNT(*) stat_value
FROM
  mode_header ,
  mode_obj_single ,
  mode_cts 
WHERE
    BINARY model IN ('HRRR_sppmp_mem0_hrconus', 'HRRR_sppmp_mem1_hrconus', 'HRRR_sppmp_mem2_hrconus', 'HRRR_sppmp_mem3_hrconus', 'HRRR_sppmp_mem4_hrconus', 'HRRR_sppmp_mem5_hrconus', 'HRRR_sppmp_mem6_hrconus', 'HRRR_sppmp_mem7_hrconus')
  AND   BINARY fcst_lead IN ('30000', '60000', '90000', '120000', '150000', '180000', '210000', '240000', '270000', '300000', '330000', '360000')
 AND  BINARY  fcst_var = 'APCP_03'  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_valid

