2021年4月4日星期日

Databricks SQL Group By

I am trying to find the highest home run totals for the month of October and group it by player name in Databricks SQL. I have tried using the following code, but I have had no luck running it correctly in SQL. I also cannot use the top 5 function either. What can I do?

select (_homeruns), player_name from baseball_csv where month=10 group by player_name;

 1. Barry Bonds  73   2. Mark McGwire 70   3. Sammy Sosa   66   4. Mark McGwire 65   5. Sammy Sosa   64  
https://stackoverflow.com/questions/66947502/databricks-sql-group-by April 05, 2021 at 10:06AM

没有评论:

发表评论