  Write $K^{(k)}_{n}$ for the complete $k$-graph on $n$ vertices. For $2 \leq k
\leq g < r$ integers, let $\pi\left(n, K^{(k)}_{g}, K^{(k)}_r\right)$ be the
maximum density of $K^{(k)}_{g}$ in $n$ vertex $K^{(k)}_{r}$-free $k$-graphs.
The main contribution of this paper is the upper bound: $\pi\left(n,
K^{(k)}_{g}, K^{(k)}_r\right) \leq \left(1 + O\left(n^{-1}\right)
\right)\prod_{m=k}^{g} \left(1 - \frac{\binom{m-1}{k-1}}{\binom{r-1}{k-1}}
\right).$ The graph case ($k=2$) is the first known generalized Tur\'an
question, investigated by Erd\H{o}s. The $k=g$ case is the hypergraph Tur\'an
problem where the best known general upper bound is by de Caen. The result
proved here matches both bounds asymptotically, while any triple $k, g, r$ with
$2 < k < g < r$ provides a new upper bound. The proof uses techniques from the
theory of flag algebras to derive linear relations between different densities.
These relations can be combined with linear algebraic methods. Additionally a
simple flag algebraic certificate will be given for $\lim_{n \rightarrow
\infty} \pi \left(n, K^{(3)}_4, K^{(3)}_5 \right) = 3/8$.
