Algebraic Geometry by Robin Hartshorne. An algebra professor once told me that almost every exercise is a lemma or theorem from SGA.
A friendlier and more accessible book for undergraduates is "Linear Algebra Problem Book" by Paul R. Halmos. Halmos is an awesome expositor and this one is no exception.

