SUM() Aggregate Function
MAX() Aggregate Function
COUNT() Aggregate Function
GROUP BY Clause
MIN() Aggregate Function
AVG() Aggregate Function
SELECT COUNT(*) AS 'total_movies', rating FROM movies GROUP BY 2 ORDER BY 1;
GROUP BY and
ORDER BY clauses can reference the selected columns by number in which they appear in the
SELECT statement. The example query will count the number of movies per rating, and will:
Trends in Startups
In this next Pro project, we're going to practice aggregate functions in SQL so you can hone your skills and feel confident taking them to the real world. Using these functions will combine row values together and return a single result. What's next? It's your first day as a TechCrunch reporter and you need SQL! You got this!
How to Hack Hacker News
Use the SQL commands you have just learned to dig through Hacker News posts data. Thank you Hacker News for the data!