title: Proving SQL query equivalency
body: <p>How would you go about proving that two queries are functionally equivalent, eg they will always both return the same result set.</p>
  
  <hr>
  
  <p>As I had a specific query in mind when I was doing this, I ended up doing as @dougman suggested, over about 10% of rows the tables concerned and comparing the results, ensuring there was no out of place results.</p>