Added anamod data to the sql function