Corrections on the SQL