title: select with aggrgation spark and scala
body: <p>iwrote this in pySpark </p>
  
  <pre><code>result = \
  df.select('*', date_format('window_start', 'yyyy-MM-dd hh:mm').alias('time_window')) \
  .groupby('time_window') \
  .agg({'total_score': 'sum'})
  result.show()
  </code></pre>
  
  <p>i want to make it work in scala language with spark 
  i did this i got i error i didn't undrstand the error cuz am new to scala </p>
  
  <pre><code>val result=df.select('*', date_format(df("time_window"),"yyyy-MM-dd hh:mm").alias("time_window"))
  .groupBy("time_window") 
  .agg(sum("total_score"))
  </code></pre>
  
  <p>the error said </p>
  
  <blockquote>
    <p>overloaded method value select with alternatives:   [U1, U2](c1:
    org.apache.spark.sql.TypedColumn[org.apache.spark.sql.Row,U1], c2:
    org.apache.spark.sql.TypedColumn[org.apache.spark.sql.Row,U2])org.apache.spark.sql.Dataset[(U1,
    U2)]    (col: String,cols: String*)org.apache.spark.sql.DataFrame
       (cols:
    org.apache.spark.sql.Column*)org.apache.spark.sql.DataFrame  cannot be
    applied to (Char,
    org.apache.spark.sql.Column)  Process.scala   /Process/src    line 30 Scala
    Problem</p>
  </blockquote>
  
  <p>How can i fix the source code to make it run under scala  </p>