We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Query Practice – Discount Program

CashPal has launched two discount programs:

  1. All users older than 55 will qualify for a senior discount.
  2. Users from Canada (country_code 'CA') qualify for a Canada Day discount.

Users who qualify for either discount will get 10% off.

Assignment

Write a query that returns every user from the users table, including all columns, plus an additional column named discount_percent.

The discount_percent column should have an integer value of 10 or 0, depending on whether the user matches any discount condition listed above.