Save the SQL query.