title: SQL Server - Dividing one column by another in a SELECT query
body: <p>I am seeking to make some Week On Week comparisons in a SELECT query.</p>
  
  <p>The basic code will select distinct areas in the leftmost column, then the following code:</p>
  
  <pre><code>SELECT 
     (CASE WHEN TIMESTAMP &gt;= GETDATE() -7 AND TIMESTAMP &lt; GETDATE() 
              THEN ORDER_ID 
              ELSE NULL 
      END) AS THISWEEK
  
  SELECT 
     (CASE WHEN TIMESTAMP &gt;= GETDATE() -14 AND TIMESTAMP &lt; GETDATE() -7 
             THEN ORDER_ID 
             ELSE NULL 
      END) AS LASTWEEK
  </code></pre>
  
  <p>I'd really like to be able to have <code>(THISWEEK / LASTWEEK) - 1</code> (Like I would in excel)</p>
  
  <p>Is this possible? </p>