Lithium nitrate decomposes as:
2LiNO3heat−−→2Li2O+4NO2+O2
Na, K, Rb decomposes as follows:
2NaNO3heat−−→2NaNO2+O2
Be, Mg, Ca, Sr, Ba decomposes as:
2Mg(NO3)2heat−−→2MgO+4NO2+O2
Hence, out of the given metals, nitrates of 6 metals (Li, Be, Mg, Ca, Sr, Ba) will decompose according to the given scheme.