SELECT a.classCode, d.className FROM TBL_KWAJUNG a left JOIN TBL_KISU b on b.kwajung_code = a.kwajung_code left JOIN TBL_CHASI c ON c.kwajung_code = a.kwajung_code AND (c.kisu_code = b.kisu_num or c.kisu_code = b.kisu_code) left JOIN TBL_CLASS_NEW d on a.classCode = d.classCode WHERE ( a.ClassCode in ('A02001001') and c.chasi_status <> '3' AND ( left(c.start_date,6) >= replace(convert(varchar(7),getdate(),102),'.','') and left(c.start_date,6) <= replace(convert(varchar(7),dateadd(M,3,getdate()),102),'.','') ) And c.end_date > replace(convert(varchar(10),getdate(),102),'.','') ) and a.kwajung_code <> '1223' group by a.classCode, d.className