Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

When combine all the max runs for each year, what is the # of run in 1912?

When combine all the max runs for each year, what is the # of run in 1912?

New Contributor

Confused on how to find this answer in the tutorial?

1 REPLY 1
Highlighted

Re: When combine all the max runs for each year, what is the # of run in 1912?

Hi @Andrew Henry, after you run

SELECT year, max(runs) FROM batting GROUP BY year;

you can find output for specific year on the "Results" pad after scrolling down.

...
1911 248
1912 226
...

However, only about 50 lines are shown, in my case up to 1919. You can also restrict the output to specific years using commands like:

SELECT year, max(runs) FROM batting where year=1912 GROUP BY year;
year _c1
1912 226

SELECT year, max(runs) FROM batting where year>=1920 GROUP BY year;
year _c1
1920 257 
1921 237 
1922 250
...

Tutorial link

Don't have an account?
Coming from Hortonworks? Activate your account here