title: order by not working on alias column in mysql query with union all query
body: <pre><code>SELECT SUM(T1.approve_con) AS compl_rec,
  SUM(T1.payout) AS payout,
  SUM(T1.reversal) AS reversal,
  T1.app_id,
  T1.end_user,
  T1.created
  FROM (
      (SELECT app_id,end_user,created,
      approve_conversions AS `approve_con`,
      '0' AS reversal,
      payout AS payout
      FROM app_end_users 
      WHERE publisher_id=1625 
      AND app_id=57)
  UNION ALL
      (SELECT opinongold_survey_response.app_id,
      opinongold_survey_response.user_id AS end_user,
      opinongold_survey_response.movement AS created,
      (CASE WHEN opinongold_survey_response.survey_status= 'Completed' THEN 1 ELSE 0 END) AS `approve_con`,
      (CASE WHEN opinongold_survey_response.survey_status= 'Rejected' THEN 1 ELSE 0 END) AS reversal,
      (CASE WHEN opinongold_survey_response.survey_status= 'Completed' THEN payout ELSE 0 END) AS payout                                  
      FROM opinongold_survey_response
      WHERE  pub_id=1625 
      AND app_id=57)
  ) AS T1
  GROUP BY T1.app_id,T1.end_user
  ORDER BY `approve_con` DESC
  LIMIT 0, 10   
  </code></pre>
  <p>above is my mysql query order by is not working on approve_con, payout, reversal column
  please let me where i am doing wrong in this query.</p>