SELECT email,max(id) as id FROM e_mails where source in (119) and email not in (select uemail from unsub_list where status = 1 and template_category=(SELECT source FROM `template_mails` where id='138' ))   
SELECT email,max(id) as id FROM e_mails where source in (119) and email not in (select uemail from unsub_list where status = 1 and template_category=(SELECT source FROM `template_mails` where id='138' ))   
SELECT email,max(id) as id FROM e_mails where source in (119) and email not in (select uemail from unsub_list where status = 1 and template_category=(SELECT source FROM `template_mails` where id='138' ))   
7 
SELECT email,max(id) as id FROM e_mails where source in (119) and email not in (select uemail from unsub_list where status = 1 and template_category=(SELECT source FROM `template_mails` where id='138' ))   
7 
