title: U-sql error: Expected one of: AS EXCEPT FROM GROUP HAVING INTERSECT OPTION ORDER OUTER UNION UNION WHERE ';' ')' ','
body: <p>I have a following table:</p>
  
  <pre><code>EstimatedCurrentRevenue -- Revenue column value of yesterday
  EstimatedPreviousRevenue  --- Revenue column value of current day
  crmId
  OwnerId
  PercentageChange.
  </code></pre>
  
  <p>I am querying two snapshots of the similarly structured data in Azure data lake and trying to query the percentage change in Revenue.</p>
  
  <p>Following is my query i am trying to join on OpportunityId to get the difference between the revenue values:</p>
  
  <pre><code>@opportunityRevenueData = SELECT (((opty.EstimatedCurrentRevenue - optyPrevious.EstimatedPreviousRevenue)*100)/opty.EstimatedCurrentRevenue) AS PercentageRevenueChange, optyPrevious.EstimatedPreviousRevenue, 
  opty.EstimatedCurrentRevenue, opty.crmId, opty.OwnerId From @opportunityCurrentData AS opty JOIN @opportunityPreviousData AS optyPrevious on opty.OpportunityId == optyPrevious.OpportunityId;
  </code></pre>
  
  <p>But i get the following error:</p>
  
  <blockquote>
    <p>E_CSC_USER_SYNTAXERROR: syntax error. Expected one of: AS EXCEPT FROM
    GROUP HAVING INTERSECT OPTION ORDER OUTER UNION UNION WHERE ';' ')'
    ',' </p>
    
    <p>at token 'From', line 40</p>
    
    <p>near the ###:</p>
  </blockquote>
  
  <p>This expression is having the problem i know but not sure how to fix it.
  (((opty.EstimatedCurrentRevenue - optyPrevious.EstimatedPreviousRevenue)*100)/opty.EstimatedCurrentRevenue)</p>
  
  <hr>
  
  <p>Please help, i am completely new to U-sql</p>