Fix another SQL error in test