SQLRepPath
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
00/60 solved

The Basics · LIKE · wildcards

3. Customers with a .ca email

Concept: LIKE · wildcardsshow

LIKE matches text against a pattern. % stands for any run of characters (including none) and _ for exactly one. 'A%' starts with A, '%son' ends with son, '%data%' contains data.

Example (different data):

SELECT name
FROM employees
WHERE email LIKE '%@acme.com';

Your task

Support is moving Canadian customers to a new helpdesk. Country is self-reported, so they trust the email domain instead.

Return name and email of every customer whose email ends in .ca, sorted by name.

Solution unlocks after 3 more tries

Starting Postgres in your browser…

query.sql
Output

Write a query and press Run Query (Ctrl/⌘ + Enter).