Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Y B
Y B
14,136 Points

SQL Aggregate function challenge

In the second challenge it asks: In the "reviews" table, with columns "score" and "movie_id", return the minimum score for the movie with the id of 2. Alias the minimum score as "min_score".

But my answer doesn't seem to work? SELECT MIN(*) AS min_score FROM reviews WHERE movie_id = 2

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

You have to pass in a column name into the MIN function, so MIN(*) won't work. Instead MIN(column_name).

Y B
Y B
14,136 Points

Thanks that did it.