MySQL - SELECT INTO OUTFILE, with a UNION Is it possible to issue multiple select queries whose resultsets are combined via union, into the same outfile?

What I am trying to do, but not working:

(SELECT email FROM table WHERE createdate &gt;= date_sub(now(), interval 1 year))
UNION DISTINCT
(SELECT email FROM table WHERE createdate &lt; date_sub(now(), interval 1 year) AND email not like '%@gmail.com')
INTO OUTFILE '/tmp/emailDump.txt' FIELDS TERMINATED BY "," LINES TERMINATED BY "\n";
Give this a Try 

SELECT * FROM
((SELECT email FROM table WHERE createdate &gt;= date_sub(now(), interval 1 year))
UNION DISTINCT
(SELECT email FROM table WHERE createdate &lt; date_sub(now(), interval 1 year) AND email not like '%@gmail.com')) A
INTO OUTFILE '/tmp/emailDump.txt' FIELDS TERMINATED BY "," LINES TERMINATED BY "\n";