Just to check are they are correct 15, 16 and 18

I am not sure did i understand very well and i would like to someone check for me

15 . Return the name of each category with the total number of apps that belong to it

SELECT category, COUNT(*) FROM fake_apps GROUP BY category;

16 . Return the price and average number of downloads grouped by price.

SELECT price, cast(ROUND(AVG(downloads)) AS int) FROM fake_apps GROUP BY price;

18 . Return the name and category and price of the most expensive app for each category.

SELECT name, category, MAX(price) FROM fake_apps GROUP BY category;

Thank you!

I had it this way -
SELECT name, category, SUM(downloads)
FROM fake_apps
GROUP BY (category);

1 Like

My 15 and 18 are identical to your’s but my 16 is different:

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

After seeing your’s i realize that i rounded to zero decimal spaces, but still my result’s are floats because i didn’t utilize

AS int