More work on the SQL Statements