title: selecting rows that are the same in one column, but different in another
body: <pre><code>X    Y    DATE
  1    20   20120101
  1    21   20120101
  2    30   20120201
  3    40   20120201
  3    41   20120301
  </code></pre>
  
  <p>I want to select any rows that have another row where X is the same, but the date is different, i.e. the answer would be</p>
  
  <pre><code>3    40   20120201
  3    41   20120301
  </code></pre>