The problem of validating outputs remains a tough issue. Output comparisons for different vendor's database systems proved to be extremely useful, but only for a small subset of common SQL. The differences in NULL and character string handling and numeric type coercion in expressions was particularly problematic (these are also portability issues).
Google-1
Google-2
By permission of the Very Large Database Endowment