how to take output from second table by joining in SQL
Try Something like if you wish to use joins :

 select name from table1 t1 inner join table2 t1 on t1.id=t2.id where t2.status = 'closed'; 


or 

select name from table1 t1, table2 t2 where t1.id=t2.id and t2.status = 'closed';