Added option to just return the SQL