Updated some sql.