Improved new sql snippets