Fixed SQL structure.