Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Basic CTE
16. Exercise 2


Excellent. You should now be ready to solve the more difficult question.


Among successful projects, those that raised 100% to 150% of the minimum amount are good projects, whereas those that raised more than 150% are great projects. Show the number of projects along with a string representing how good the project is (good projects or great projects) name the column tag.

The results should look similarly to this:

count tag
16 good projects
7 great projects

Stuck? Here's a hint!

You will need two CTEs: one for those projects which raised 100-150% and another one for those >150%. Use HAVING clauses to check the conditions. Use UNION to show results from both queries.