Compares the output of two SQL statements