The divalent metal whose oxide is reduced to metal by electrolysis of its fused salt is Mg.
Ca is also divalent metal whose fused salt is reduced to metal by electrolysis.
(Al/Na/K) are trivalent, monovalent and monovalent respectively. Their fused salts are also reduced to metal by electrolysis.