Complex sentence: In 1689 Melville was made Earl of Melville and sole Secretary of State over Scotland and Stair was made Lord Advocate and in 1691 he was appointed as the joint Secretary of State.
Split into simpler sentences: In 1689 Melville was made Earl of Melville and sole Secretary of State over Scotland and Stair was made Lord Advocate. In 1691 Stair was appointed as the joint Secretary of State.