127/224
\begin{frame}
  \frametitle{Subqueries under From}
  
  Since an \emph{SQL query returns a table},
  it makes sense to use a subquery wherever a table might be specified.
  \begin{goal}{}
    SQL allows subqueries in the \sql{from} clause.
  \end{goal}
  \pause\bigskip

  \begin{code}{\textwidth}{Points (in\ \%) achieved in homework exercise 1}
    \footnotesize
    \BUseVerbatim{query}
  \end{code}
  Note:  join of \sql{Results} and \sql{Exercises} is computed in a subquery.
  \pause\vspace{0ex}
  
  \begin{goal}{}
    One use of subqueries under \sql{from} are \emph{nested aggregations}.
  \end{goal}
\end{frame}