select T.*,P.ProductName from (select V.CompanyID,C.CompanyName,V.ProductCode from VehicleInsuranceAgentConfiguration V inner join Company C on V.CompanyID = C.CompanyID where V.IsDelete=0 and V.Host<>'' and V.XmlConfig<>'') T inner join Product P on T.ProductCode = P.ProductCode