title: How to Use Multiple Columns in Partition By And Ensure No Duplicate Row is Returned
body: <p>I have used multiple columns in Partition By statement in SQL but duplicate rows are returned back. I only want distinct rows being returned back.</p>
  
  <p>This is what I have coded in Partition By:</p>
  
  <pre><code>SELECT DATE, STATUS, TITLE, ROW_NUMBER() OVER (PARTITION BY DATE, STATUS, TITLE ORDER BY QUANTITY ASC) AS Row_Num
      FROM TABLE
  </code></pre>
  
  <hr>
  
  <p>This is the output I get currently: (Where there are <strong>duplicate</strong> rows being returned - <strong>Please Refer to Row 6 to 8</strong>)</p>
  
  <h2><a href="https://i.stack.imgur.com/foe7g.png" rel="noreferrer"><img src="https://i.stack.imgur.com/foe7g.png" alt="enter image description here"></a></h2>
  
  <p>This is the output I want to achieve: (<strong>no duplicate</strong> row being returned - <strong>Please Refer to Row 6 to 8</strong>)</p>
  
  <h2><a href="https://i.stack.imgur.com/GkrHP.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GkrHP.png" alt="enter image description here"></a></h2>
  
  <p><strong>Question</strong>: How can I place <strong>multiple columns</strong> in <strong>1 Partition By</strong> and Ensure <strong>No Duplicate</strong> Row is Returned?</p>
  
  <p>Appreciate if someone can provide me help on this, thanks a lot!!</p>