Creating and combining columns to form tables