select L.LicenseType, EA.Address,EA.city,EA.sate from Entity E
leftouterjoin License L on E.EntityId = L.EntityId
leftouterjoin EntityAddress EA on EA.Entity = L.EntityId
where E.EntityId = <entityid> and L.LicenseType = '<licensetype>'</licensetype></entityid>