Added mos_code and seq to sql