The email toolkit

Boss exercise. Marketing wants every customer email split into its local part (before the @) and its domain (after it). Write one query that builds both columns for all 15 customers: local_part and domain. INSTR(email, '@') finds the position of the @ — then SUBSTR() cuts around it.

Tables in this exercise
customers
id first_name last_name email city country joined_date support_rep_id

Back to the chapter