modified sql