title: Select Middle Rows in SQL Server
body: <p>I have a table where I want to select the last 10% of rows, offset by 10% (so I want to select the last 80-90% of the data). </p>
  
  <p>I wrote the following query </p>
  
  <pre><code>SELECT TOP 10 PERCENT
     [col1], [col2]
  FROM [table]
  ORDER BY [col1] DESC
  OFFSET 10 ROWS
  </code></pre>
  
  <p>But I receive the following error:</p>
  
  <blockquote>
    <p>Line 5: Incorrect syntax near 'OFFSET'.</p>
  </blockquote>
  
  <p>What am I doing wrong? I am using Microsoft SQL Server 2012 which should be compatible with <code>OFFSET</code></p>