select sb.LastRunTime as SonGonderim,sb.LastStatus,sb.Description,s.ScheduleID from Raportal.[dbo].[Schedule] s with (nolock) join Raportal.[dbo].[ReportSchedule] rs with (nolock) on s.ScheduleID=rs.ScheduleID join Raportal.[dbo].Subscriptions sb with (nolock) on sb.SubscriptionID=rs.SubscriptionID where 1=1 and sb.DeliveryExtension='Report Server Email' and LastStatus not in ('Disabled','New Subscription') --and LastStatus not like '%sent to%' --and LastStatus not like '%; 0 errors%' --and sb.LastRunTime>= (getdate()-8) order by 1 desc