select 
distinct
	ps.Person_SurName
	,ps.Person_FirName
	,ps.Person_SecName
	,ps.Person_BirthDay
	,ps.Person_id
	,dir.EvnDirection_setDate
	,dir.EvnDirection_Num
	,dir.EvnDirection_id--,dir.*
from v_EvnDirection as dir 
join  v_PersonState as PS on dir.Person_id=ps.Person_id
where 	
	ps.Person_SurName not like '%тест%'
	and ps.Person_FirName not like '%тест%'
	and ps.Person_SecName not like '%тест%'
	and cast(dir.EvnDirection_setDate as date) between '2021-01-01' and cast(now() as date)
