Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Basic CTE
Summary
16. Exercise 2

Instruction

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

Exercise

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.