All persons may join in one action as plaintiffs if they assert any right to relief jointly, severally, or in the alternative in respect of or arising out of the same transaction, occurrence, or series of transactions or occurrences and if any question of law or fact common to all these persons will arise in the action. All persons may be joined in one action as defendants if there is asserted against them jointly, severally, or in the alternative, any right to relief in respect of or arising out of the same transaction, occurrence, or series of transactions or occurrences and if any question of law or fact common to all defendants will arise in the action. A plaintiff or defendant need not be interested in obtaining or defending against all the relief demanded. Judgment may be given for one or more of the plaintiffs according to their respective rights to relief, and against one or more defendants according to their respective liabilities.
SDCL 15-6-20(a)