select prodcode,count(*) from LOT_product where inputdate >= '2012-05-06 00:00:00'and inputdate <= '2012-05-12 23:59:59' group by prodcode having count(*) >= 5 order by count(*) DESC limit 0,10