Updated table and SQL