sql did not match output

@junshao please review and merge