create query for udate