Loading exercise…
Loading exercise…
Exercises are built for a keyboard. Read the task here, then open this page on a laptop to solve it.
SUBSTR and LENGTH. SUBSTR(text, start, length) cuts out part of a text; positions start at 1, and without a length it runs to the end, so SUBSTR('C-1001', 3) is '1001'. LENGTH(text) counts characters. CAST the piece AS INTEGER to compare it with a number column.
select product_name, substr(product_name, 1, 5) as short_name, length(product_name) as chars from products
Data ops found CRM contacts whose customer ref doesn't belong to any Brightline customer. They want the list before the import goes live.
Return contact_id and customer_ref for every crm_contacts row whose ref number (the digits after 'C-', once the ref is trimmed) matches no customer_id in customers.
Loading the Brightline dataset…
Language
Full plan
SQL ✓ · Excel and Power BI also included
Cancel anytime · 14-day full refund · Secure payment by Stripe