Improve tests of the SQL generator.