sql code edits