adding sql snippet for subclass tables