SELECT emails.id polymorphic_id, 'Emails' polymorphic_module FROM emails
								   JOIN emails_text on emails.id = emails_text.email_id
                                   WHERE (type = 'draft' OR status = 'draft') AND assigned_user_id = '1' AND emails.deleted = '0' AND status NOT IN ('archived') AND type NOT IN ('archived')