Added the sql queries