SELECT A.*
           ,FN_SY_CLASS_R01(star,'CLASS_NM') AS star_nm
           ,B.class_l_seq
           ,B.class_m_seq
           ,FN_SY_CLASS_R01(A.grade_code,'CLASS_NM') AS grade_nm
         ,FN_BA_CLASS_INFO_R01(A.area_2,'CLASS_NM') AS area_2_nm
	    ,(SELECT MIN(B.price) FROM HT_ROOM B WHERE B.ht_mst_seq = A.ht_mst_seq AND B.day >= :to_day) AS min_price
FROM HT_MST A
INNER JOIN HT_MAPPING B ON A.ht_mst_seq = B.ht_mst_seq
WHERE B.channel_comp_seq = 2
AND A.htl_name like concat('%',:head_search_text,'%')
AND A.use_yn = 'Y'
GROUP BY A.ht_mst_seq
ORDER BY min_price :_orderby