Updated the SQL to represent final version of DB