xms西软预定列表-房类市场

 

 

 

 

select b.descript,sum(a.quan) as quan,case  WHEN c.descript is  null THEN '团队预留'  ELSE c.descript end as mkt_des ,count(distinct roomno) as room
from rsvsrc a  
LEFT JOIN typim b on (a.hotelid=b.hotelid and a.type=b.code)
LEFT JOIN basecode c on (a.market=c.code and c.cat='mktcode') where   a.accnt in (select accnt from master where sta='R' or sta='I') group by a.type,a.market;

 

posted @ 2019-10-31 11:54  landv  阅读(334)  评论(0编辑  收藏  举报