The topic of CTEs was recently discussed (with much vigor) on the SQLite users mailing list:
https://www.mail-archive.com/sqlite-users@sqlite.org/msg8119...
https://www.mail-archive.com/sqlite-users@sqlite.org/msg8119...
Note: I have far more SQL Server experience than I do with any other DBMS.