title: query sql error on pentaho data integration
body: <p>my sql query is     </p>
  
  <pre><code>SELECT
      dim_location.country_name,
      COUNT(fact_flight.sk_fact)
  FROM
      dim_date, dim_location
      INNER JOIN fact_flight ON dim_location.sk_location = fact_flight.sk_fact AND 
      dim_date.date_key = fact_flight.date_key
  
  WHERE
      fact_flight.date_key = dim_date.date_key
  GROUP BY
      dim_location.country_name
  </code></pre>
  
  <p>we want to show location based day name but it's doesn't work and find error :</p>
  
  <blockquote>
    <p>#1054 - Unknown column 'dim_date.date_key' in 'on clause'</p>
  </blockquote>