title: Can I use WHERE clause after JOIN USING in snowflake?
body: <p>Can I use WHERE after</p>
  <p>JOIN USING?</p>
  <p>In my case if I run on snowflake multiple times the same code:</p>
  <pre><code>with CTE1 as
  (
  select * 
  from A
  left join B 
  on A.date_a = B.date_b
  )
  select * 
  from CTE1
  inner join C 
  using(var1_int)
  where CTE1.date_a &gt;= date('2020-10-01')
  limit 1000;
  </code></pre>
  <p>sometimes I get a result and sometimes i get the error:</p>
  <pre><code>SQL compilation error: Can not convert parameter 'DATE('2020-10-01')' of type [DATE] into expected type [NUMBER(38,0)]
  </code></pre>
  <p>where NUMBER(38,0) is the type of var1_int column</p>