An Azure relational database service.
Azure SQL and MS SQL share a common problem with CTE's.
CTE's are executed once per join in the dependent SELECT. Thus if you have to join the same CTE twice in the final SQL, you will be traversing your 100M rows multiple times which is not very performant.
I would go for TEMP table if the resultant dataset is less than 1/3 of available session memory or work memory. If more I would go for a view.
Visit my blog on CTE optimization comparing CTE across multiple databases. https://www.linkedin.com/pulse/ctesubquery-factoring-optimization-raja-surapaneni-jyjie/