When actions involving a common question of law or fact are pending before the court, it may order a joint hearing or trial of any or all the matters in issue in the actions; it may order all the actions consolidated; and it may make such orders concerning proceedings therein as may tend to avoid unnecessary costs or delay.
SDCL 15-6-42(a)