Let $A \subset B$ a ring extension. It is well known that if the extension is integral, then $\dim B=\dim A$. I can think of some examples where the Krull dimension increases (and by that I mean $\dim B>\dim A$), like $A \subset A[X]$ for any ring $A$. And this situation looks a bit natural or intuitive to me, even though Krull dimension has nothing to do with others notions of dimension I'm used to work with, like the dimension of a vector space. In the few exemples of extension decreasing the Krull dimension I've seen, $B$ is a field.
So here is my question:
can you give some examples of extensions decreasing Krull dimension where $B$ is not a field?
Here you are: let $n\ge 1$. Then for any $k\enspace(0\le k <n)$: $$ A=\mathbf Z[X_1,\dots, X_n]\subset B=\mathbf Q(X_1,\dots,X_k)[X_{k+1},\dots, X_n]$$ satisfies $\dim A=n+1,\enspace\dim B=n-k$.