title: How to add two columns together and order by id in scala?
body: <p>My df is like <code>id col1 col2</code> and I want to sum <code>col1</code> and <code>col2</code> together to make <code>cols</code>. Then display <code>id cols</code> order by id. I know how to do sum like <code>df.select($"col1" + $"col2").orderBy(desc("id"))</code> but <code>df.select($"col1" + $"col2")</code> will remove <code>id</code> so I cannot do orderBy <code>id</code>. Any idea?</p>