__注意不要漏了消费类型 t_type='1' select date_format(t_time,'%Y-%m') time,sum(t_amount) total from trade t join customer c on t.t_cus=c.c_id where c_name='Tom' and year(t_time)=2023 and t_type='1' group by time order by time