title: Snowflake SQL compilation error: syntax error line XX at position XX unexpected '('
body: <p>While running SQL query on Snowflake, I am getting syntax error that I have <em>unexpected '('</em>. Below is the code that is giving me the error. </p>
  
  <pre><code>,(EndOrder_time) - min(StartOrder_time) over (
      partition by EntryNumber, TechnicianEnterpriseID
      order by RouteDateTime rows between 1 preceding and current row
  ) day (4) to second as Repair_Time 
  </code></pre>