SQL Bug

Need more info on the issue