No, MySQL does not support Common Table Expressions (CTE). So instead of using WITH tablealias as (....) you will need to execute a subquery.
For instance,
WITH totalcount AS (select userid, count(*) as tot from logins group by userid) SELECT a.firstname, a.lastname, b.tot FROM users a INNER JOIN totalcount b on a.userid = b.userid
can be rewritten in MySQL as
SELECT a.firstname, a.lastname, b.totalcount FROM users a INNER JOIN (select userid, count(*) as tot from logins group by userid) b on a.userid = b.userid
source share