title: SQL LEFT JOIN Subquery Alias
body: <p>I'm running this SQL query:</p>
  
  <pre><code>SELECT wp_woocommerce_order_items.order_id As No_Commande
  FROM  wp_woocommerce_order_items
  LEFT JOIN 
      (
          SELECT meta_value As Prenom
          FROM wp_postmeta
          WHERE meta_key = '_shipping_first_name'
      ) AS a
  ON wp_woocommerce_order_items.order_id = a.post_id
  WHERE  wp_woocommerce_order_items.order_id =2198
  </code></pre>
  
  <p>And I get this error:</p>
  
  <blockquote>
    <p>#1054 - Unknown column 'a.post_id' in 'on clause'.</p>
  </blockquote>
  
  <p>I think my code is pretty simple, but I can't make it right. What am I doing wrong? </p>