MySQL Forums
Forum List  »  Newbie

Re: Looping through a SELECT statement
Posted by: Peter Brawley
Date: September 28, 2020 09:36PM

Read about Group By.

select yearid, sum(h), sum(2b), sum(3b), sum(hr), sum(bb), sum(so)
from batting
where lgid="NL"
group by yearid
order by yearid;

Options: ReplyQuote


Subject
Written By
Posted
Re: Looping through a SELECT statement
September 28, 2020 09:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.