Stack vent termination height above roof?


Does this vent pipe have to extend beyond the main roof? Or can it just exit above the lower roof?