title: How do I (or can I) SELECT DISTINCT on multiple columns?
body: <p>I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.</p>
  
  <p>So I'm thinking:</p>
  
  <pre><code>UPDATE sales
  SET status = 'ACTIVE'
  WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)
               FROM sales
               HAVING count = 1)
  </code></pre>
  
  <p>But my brain hurts going any farther than that.</p>