SELECT DISTINCT People.*, People_Email.Email FROM People LEFT JOIN People_Email ON People.ID = People_Email.Person WHERE People.Active = 1 AND (People_Email.Primary = 1 OR IsNULL(People_Email.Primary)) AND People.Status = 4 AND (People.Ende > #11/21/2024# OR IsNULL(People.Ende)) ORDER BY People.Arbeitgeber, People.Name, People.Vorname