Updated SQL- Not finished