Added the sql needed