title: Convert Access TRANSFORM/PIVOT query to SQL Server
body: <pre><code>TRANSFORM Avg(CASE WHEN [temp].[sumUnits] &gt; 0 
                     THEN [temp].[SumAvgRent] / [temp].[sumUnits] 
                     ELSE 0 
                END) AS Expr1
  SELECT [temp].[Description]
    FROM [temp] 
  GROUP BY [temp].[Description]
  PIVOT [temp].[Period];
  </code></pre>
  
  <p>Need to convert this query for sql server</p>
  
  <p>I have read all other posts but unable to convert this into the same</p>