# 按产品分类,查询创建时间2019-01-01~2019-12-19内的bug并且解决方案为External的bug数 select (select name from bf_product where t.product_id = id ),product_id,count(1) from bf_bug_info t WHERE created_at >'2019-01-01 00:00:01'and created_at <'2019-12-19 18:59:00'and solution = "External" groupby product_id ;