title: #1054 unknown column in order clause
body: <p>I am trying to export my database table directly into csv file but getting 
  error like below</p>
  
  <blockquote>
    <p>1054 - Unknown column 'callstart' in 'order clause'</p>
  </blockquote>
  
  <pre><code>SELECT 'Date','callerid','Called Number','Code','Destination'
  UNION ALL 
  SELECT 
    CONVERT_TZ(`callstart`,'+00:00','+02:00') as call_date, 
    callerid, callednum, pattern, notes 
  FROM (cdrs) 
  WHERE `callstart` &gt;= '2015-06-12 00:00:01' 
    AND `callstart` &lt;= '2015-06-13 23:59:59' 
    AND `parent_id` = '0' 
  ORDER BY callstart DESC 
  INTO OUTFILE '/tmp/2015-06-27-11-28-47.csv' 
  FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY ' ';
  </code></pre>
  
  <p>CDRS Table :</p>
  
  <pre><code>Field Name | Datatype   |Null 
  -----------------------------
  callstart  | datetime   |No
  callerid   | varchar(30)|No
  callednum  | varchar(30)|No
  pattern    | varchar(20)|No
  notes      | varchar(80)|NO
  parent_id  | int(11)    |NO
  </code></pre>
  
  <p>And cdrs table have already callstart field but why i am getting this that i don't know </p>
  
  <p>NOTE : <br>
  If I will remove before UNION ALL Query then it works fine but I have export this query with heading so I just add UNION ALL so if is there any other way in which I can add heading manually from database then also it will fine but sequence of fields must not be changed</p>
  
  <p>Any suggestions ?</p>