FAQ: Aggregate Functions - Review

This community-built FAQ covers the “Review” exercise from the lesson “Aggregate Functions”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development
Data Science

Learn SQL

FAQs on the exercise Review

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

When I click " I want to do an even more advanced real-world SQL project.,
The link tells me that I dont have access to that page.
Why?
I am a Pro Learner.
Thank you for reply.

I have a question to the HAVING with regard to the fake_apps database.

The following SQL commands show that price = 3.99 contains both apps with download greater and less than 10000.

SELECT name, downloads, price
FROM fake_apps
WHERE downloads > 10000
 AND price=3.99;
--- 7 apps returned
  
SELECT name, downloads, price
FROM fake_apps
WHERE downloads < 10000
 AND price=3.99;
--- 2 apps returned

If I now want to get the average downloads in each price category, I call:

SELECT price, AVG(downloads)
FROM fake_apps
GROUP BY price;

However, if I want to consider apps with downloads above 10000, I would call

SELECT price, AVG(downloads)
FROM fake_apps
WHERE downloads > 10000
GROUP BY price;

Accidenetly I however typed:

SELECT price, AVG(downloads)
FROM fake_apps
GROUP BY price
HAVING downloads > 10000; 

Here the entry for price = 3.99 vanishes - but not for any other entry. Why does it vanish?