Olympic data spark SQL task Quesion no – 3

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Spark Olympic data spark SQL task Quesion no – 3

Viewing 1 reply thread
  • Author
    Posts
    • #5501
      DataFlair TeamDataFlair Team
      Spectator

      Top 10 athletes who won highest gold medals
      in all the Olympic event

      Answer given as

      spark.sql(“SELECT _c0, sum(_c9) as cnt FROM olympic group by _c0 order by cnt DESC”).show
      But c9 as as total model , _c6 column as gold medal, I believe we need to look

      spark.sql(“SELECT _c0, sum(_c6) as cnt FROM olympic group by _c0 order by cnt DESC”).show

    • #5502
      DataFlair TeamDataFlair Team
      Spectator

      Yes It should be _c6

Viewing 1 reply thread
  • You must be logged in to reply to this topic.