This query works for me, but I don't want to use a subquery. I tried a lot but failed can I use this query without a subquery?
select a1.active_id
from active_table a1
where a1.active_id
NOT IN ( select a2.active_id from view a2 group by a2.active_id )
AND datediff(now(),active_date)>30