title: Check if two columns are equal for all rows per group
body: <p>Assuming a DB like this:</p>
  
  <pre><code>Date | Attribute1 | Attribute2 | ... | AttributeN
  -------------------------------------------------
  1    | A          | C          | ... | ...
  1    | B          | C          | ... | ...
  2    | A          | A          | ... | ...
  2    | B          | B          | ... | ...
  2    | A          | A          | ... | ...
  3    | B          | B          | ... | ...
  3    | A          | A          | ... | ...
  4    | B          | C          | ... | ...
  4    | A          | A          | ... | ...
  </code></pre>
  
  <p>I am trying to find for which unique dates (they are actual <code>date</code>s in the real case but I don't think that matters), <em>ALL</em> elements of <code>Attribute1</code> are equal to their corresponding elements in <code>Attribute2</code>. The result for the example data above would be</p>
  
  <pre><code>Date
  ----
  2
  3
  </code></pre>
  
  <p>Because for each record that has <code>date</code> equal to <code>2</code> (and the same for <code>3</code>) , <code>Attribute1</code> is equal to <code>Attribute2</code>. <code>4</code> is not returned because although the last record in the sample does meet the criterion (since <code>A</code> equals <code>A</code>), the second last record does not (since <code>B</code> does not equal <code>C</code>).</p>
  
  <p>I could not work out how to write this query, I was hoping for some aggregate function (shown as <code>ALL(...)</code> in the code below) that would allow me to write something like:</p>
  
  <pre><code>SELECT Date
  FROM myTable
  GROUP BY Date
  HAVING ALL(Attribute1 = Attribute2)
  </code></pre>
  
  <p>Is there such a function? Otherwise is there a clever way to this using <code>COUNT</code> maybe?</p>