select sum(goods_num) from order_goods as t1 left join (select order_id, order_time from order_info) as t2 on t1.order_id=t2.order_id where year(t2.order_time)=2020 and month(t2.order_time)=07; select goods_id, sum(goods_num) from order_goods as t1 left join (select order_id, order_time from order_info) as t2 on t1.order_id=t2.order_id where year(t2.order_time)=2020 and month(t2.order_time)=07 group by goods_id order by sum(goods_num) desc limit 1