title: Spark sql group by and sum changing column name?
body: <p>In this data frame I am finding total salary from each group. In Oracle I'd use this code</p>
  
  <pre><code>select job_id,sum(salary) as "Total" from hr.employees group by job_id;
  </code></pre>
  
  <p>In Spark SQL tried the same, I am facing two issues</p>
  
  <pre><code>empData.groupBy($"job_id").sum("salary").alias("Total").show()
  </code></pre>
  
  <ol>
  <li>The alias total is not displaying instead it is showing "sum(salary)" column</li>
  <li><p>I could not use <code>$</code> (I think Scala SQL syntax). Getting compilation issue</p>
  
  <pre><code> empData.groupBy($"job_id").sum($"salary").alias("Total").show()
  </code></pre></li>
  </ol>
  
  <p>Any idea?</p>