SQL Fixed by Jason's superior MySQL skills