So I have this similar request
WITH customers_in_usa AS ( SELECT customerName, state FROM customers WHERE
WITH customers_in_usa AS is for now invalid MySQL code. MySQL will support CTE's in the future in MySQL version 8..
WITH customers_in_usa AS
You could rewrite your SQL code, that should give the same results.
SELECT customerName , state FROM customers WHERE country = 'USA' AND state = 'CA' ORDER BY customerName