More SQL modifications