Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Basic CTE
10. Multiple CTEs – practice 1


Fine, it's time to practice!


Show together two groups of users:

  • those who donated more than $200 altogether,
  • those who donated at least twice.

For each of them, show id, first_name and last_name.

Stuck? Here's a hint!

Use one CTE for those that donated over 200 dollars and another one for those who donated at least twice. Remember to start with the keyword WITH.

In order to show all the results, even when a person is a member of these two groups, use UNION ALL.