It's Autumn! Prices fall like leaves! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Basic CTE
10. Multiple CTEs – practice 1
Summary

Instruction

Well done! Let’s practice this again.

Exercise

Show two groups of users:

  • Those who donated at least $200 (per person, in total).
  • Those who donated at least twice.

For each group, show each supporter’s ID and first and last names.

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.

To show all the results, even when a person is a member of both groups, use UNION ALL.