SET @start_date = '2023-11-17'; SET @end_date = '2023-11-20'; select a.city,b.t2-a.t1 from (select city,wework_gft_group_user_cnt t1 from fc_sr_day_wework_user_stat where d_day = @start_date group by city) a join (select city,wework_gft_group_user_cnt t2 from fc_sr_day_wework_user_stat where d_day=@end_date group by city) b on a.city=b.city ;标签:city,group,wework,日期,user,设置,date,day From: https://www.cnblogs.com/xuchuanhui/p/17846342.html