select active entities and relations based on country