select * ,
(select b_name from bc where bc.b_uid=good.b_uid limit 1) as b_uid_nm ,
(select m_name from mc where mc.m_uid=good.m_uid limit 1) as m_uid_nm ,
if(gdt='gr','조인투어','단독투어') as gdt_nm
from good where 1 = 1 AND welfare IS NULL and g_uid='1605'