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 = 'dc7e7910-9a46-2d41-73db-549824459d29' AND emails.deleted = '0' AND status NOT IN ('archived') AND type NOT IN ('archived')