title: How to order by a formula in MySQL
body: <p>I have this query:</p>
  
  <pre><code>SELECT locations.id, 1609.34 * 3956 * 2 * 
              ASIN(
                  SQRT(
                      POWER(
                          SIN(
                              (55.170000 - abs(locations.latitude)) 
                          * pi() / 180 / 2), 2) + 
                          COS(55.170000 * pi() / 180 ) *
                          COS(abs
                              (locations.latitude) * pi() / 180) * POWER(SIN((-7.400000 - (locations.longitude)) *  pi() / 180 / 2), 2)
              ) 
              ) as result 
          FROM locations order by result asc limit 10;
  </code></pre>
  
  <p>What I want is to get only the locations.id column, but at the same time order it by the formula so I can easily use hibernate.</p>
  
  <p>I do not want to have in the select result table the "result" new column.</p>
  
  <p>How can I do this in MySQL ?</p>