select sum(roomqty*days) as roomnums,o.hotelname,o.ordercd,o.checkindate,t.name from hrm_order as o,test as t where o.checkindate between t.name and t.password group by t.name,o.hotelid
select sum(roomqty*days) as roomnums,o.hotelname,o.ordercd,o.checkindate,t.name from hrm_order as o,test as t where o.checkindate between t.name and t.password group by t.name,o.hotelid