title: Cannot order posts by meta value
body: <p>I'm trying to get a list of <code>Wordpress</code> posts, sorting them using the <code>meta_key</code> = "zoacres_property_price" in DESC order, so I did:</p>
  
  <pre><code>SELECT SQL_CALC_FOUND_ROWS p.* 
                        FROM wpps_posts p
                       CROSS
                        JOIN wpps_postmeta m
                       INNER
                        JOIN wpps_term_relationships r
                          ON p.ID = r.object_id
                       WHERE r.term_taxonomy_id IN (76) 
                         AND p.post_type = 'zoacres-property' 
                         AND p.post_status = 'publish'  
                         AND m.meta_key = 'zoacres_property_price'
                       GROUP 
                          BY p.ID 
                       ORDER 
                          BY m.meta_value ASC 
                      LIMIT 6, 6
  </code></pre>
  
  <p>unfortunately I got this error:</p>
  
  <blockquote>
    <p>Unknown column wpps_posts.ID in on clause</p>
  </blockquote>
  
  <p>what I did wrong? The column exists</p>