SELECT
  model,
  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 ('>=2.54')
  AND   BINARY fcst_init IN ('2020-10-01 00:00:00')
  AND   BINARY model IN ('AI_B3Hdaily_area100')
  AND   BINARY fcst_lead IN ('240000', '480000', '720000', '960000', '1200000', '1440000', '1680000', '1920000', '2160000', '2400000', '2640000', '2880000', '3120000', '3360000', '3600000', '3840000', '4080000', '4320000', '4560000', '4800000', '5040000', '5280000', '5520000', '5760000', '6000000', '6240000', '6480000', '6720000', '6960000', '7200000', '7440000', '7680000', '7920000', '8160000', '8400000', '8640000', '8880000', '9120000', '9360000', '9600000', '9840000', '10080000', '10320000', '10560000', '10800000', '11040000', '11280000', '11520000', '11760000', '12000000', '12240000', '12480000', '12720000', '12960000', '13200000', '13440000', '13680000', '13920000', '14160000', '14400000', '14640000', '14880000', '15120000', '15360000', '15600000', '15840000', '16080000', '16320000', '16560000', '16800000', '17040000', '17280000', '17520000', '17760000', '18000000', '18240000', '18480000', '18720000', '18960000', '19200000', '19440000', '19680000', '19920000', '20160000', '20400000', '20640000', '20880000', '21120000', '21360000', '21600000', '21840000', '22080000', '22320000', '22560000', '22800000', '23040000', '23280000', '23520000', '23760000', '24000000', '24240000', '24480000', '24720000', '24960000', '25200000', '25440000', '25680000', '25920000', '26160000', '26400000', '26640000', '26880000', '27120000', '27360000', '27600000', '27840000', '28080000', '28320000', '28560000', '28800000', '29040000', '29280000', '29520000', '29760000', '30000000', '30240000', '30480000', '30720000', '30960000', '31200000', '31440000', '31680000', '31920000', '32160000', '32400000', '32640000', '32880000', '33120000', '33360000', '33600000', '33840000', '34080000', '34320000', '34560000', '34800000', '35040000', '35280000', '35520000', '35760000', '36000000', '36240000', '36480000', '36720000', '36960000', '37200000', '37440000', '37680000', '37920000', '38160000', '38400000', '38640000', '38880000', '39120000', '39360000', '39600000', '39840000', '40080000', '40320000', '40560000', '40800000', '41040000', '41280000', '41520000', '41760000', '42000000', '42240000', '42480000', '42720000', '42960000', '43200000', '43440000', '43680000', '43920000', '44160000', '44400000', '44640000', '44880000', '45120000', '45360000', '45600000', '45840000', '46080000', '46320000', '46560000', '46800000', '47040000', '47280000', '47520000', '47760000', '48000000', '48240000', '48480000', '48720000', '48960000', '49200000', '49440000', '49680000', '49920000', '50160000', '50400000', '50640000', '50880000', '51120000', '51360000', '51600000', '51840000', '52080000', '52320000', '52560000', '52800000', '53040000', '53280000', '53520000', '53760000', '54000000', '54240000', '54480000', '54720000', '54960000', '55200000', '55440000', '55680000', '55920000', '56160000', '56400000', '56640000', '56880000', '57120000', '57360000', '57600000', '57840000', '58080000', '58320000', '58560000', '58800000', '59040000', '59280000', '59520000', '59760000', '60000000', '60240000', '60480000', '60720000', '60960000', '61200000', '61440000', '61680000', '61920000', '62160000', '62400000', '62640000', '62880000', '63120000', '63360000', '63600000', '63840000', '64080000', '64320000', '64560000', '64800000', '65040000', '65280000', '65520000', '65760000', '66000000', '66240000', '66480000', '66720000', '66960000', '67200000', '67440000', '67680000', '67920000', '68160000', '68400000', '68640000', '68880000', '69120000', '69360000', '69600000', '69840000', '70080000', '70320000', '70560000', '70800000', '71040000', '71280000', '71520000', '71760000', '72000000', '72240000', '72480000', '72720000', '72960000', '73200000', '73440000', '73680000', '73920000', '74160000', '74400000', '74640000', '74880000', '75120000', '75360000', '75600000', '75840000', '76080000', '76320000', '76560000', '76800000', '77040000', '77280000', '77520000', '77760000', '78000000', '78240000', '78480000', '78720000', '78960000', '79200000', '79440000', '79680000', '79920000', '80160000', '80400000', '80640000', '80880000', '81120000', '81360000', '81600000', '81840000', '82080000', '82320000', '82560000', '82800000', '83040000', '83280000', '83520000', '83760000', '84000000', '84240000', '84480000', '84720000', '84960000', '85200000', '85440000', '85680000', '85920000', '86160000', '86400000', '86640000', '86880000', '87120000', '87360000', '87600000')
 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_init,
  fcst_thr

