According to code, what is the minimum distance that a hole may be drilled from the top or bottom of a joist.

According to code, what is the minimum distance that a hole may be drilled from the top or bottom of a joist.