  In this article, we give the answer to the following question: Given a field
$\mathbb{F}$, finite subsets $A_1,\dots,A_m$ of $\mathbb{F}$, and $r$ linearly
independent polynomials $f_1,\dots,f_r \in \mathbb{F}[x_1,\dots,x_m]$ of total
degree at most $d$. What is the maximal number of common zeros $f_1,\dots,f_r$
can have in $A_1 \times \cdots \times A_m$? For $\mathbb{F}=\mathbb{F}_q$, the
finite field with $q$ elements, answering this question is equivalent to
determining the generalized Hamming weights of the so-called affine Cartesian
codes. Seen in this light, our work is a generalization of the work of
Heijnen--Pellikaan for Reed--Muller codes to the significantly larger class of
affine Cartesian codes.
