update query scripts