Resolv bug SQL