Given schemes $X_{1}$, $X_{2}$ and $Y$ such that $X_{1}$ and $X_{2}$ are affine. Further let $p_{i}$: $X_{i} \rightarrow Y$ ($i=1,2$) be étale morphisms.
Under what conditions is $X_{1} \times_{Y}X_{2} = Z$ an affine scheme?
If $Y$ is affine or one of $p_{i}$ is affine, then of course $Z$ is affine, so assume the contrary. If $p_{i}$'s are open embeddings then $Y$ being separated ensures $Z$ is affine. Is that sufficient (Y being separated )in étale case as well? If not what's the counterexample. What if one of the $p_{i}$ is an open embedding.
If $Y$ is separated then $$ X_1 \times_Y X_2 = (X_1 \times X_2) \times_{Y \times Y} Y $$ is closed in $X_1 \times X_2$. The latter is affine, hence so is the former.