Rear yard. A building not used in whole or in part as a dwelling shall not require a rear yard, but for all buildings used as dwellings, there shall be a rear yard, the depth of which, exclusive of any portion of the depth to be used for accessory buildings, shall not be less than 15% of the depth of the lot but need not exceed 15 feet. In case of mixed occupancy, any portion of a building used as a dwelling shall be provided with a rear yard as prescribed in the preceding subsection.