56,687
社区成员
发帖
与我相关
我的任务
分享
select distinct b.idtable_yonghu,b.yonghuID,b.yonghu_name,
(select max(a.riqi) from table_reception a where a.yonghuID = b.yonghuID and a.riqi > '2018-4-10' and a.riqi < '2018-4-11' and a.dianhao = '0218' and a.jinshouren = '店长') as jiedai
from table_yonghu b
where isdeleted = 0 order by jiedai desc