Closed jjorissen52 closed 3 years ago
Is it possible to use multiple CTEs in one query? E.g:
WITH your_cte_name AS ( SELECT foo, bar FROM your_table ), cte_number_2_name AS ( SELECT foo FROM your_cte_name ) SELECT * FROM cte_number_2_name
Yes https://github.com/dimagi/django-cte/blob/fede416338ec0c5a967e2f1f902435061ae630e1/tests/test_cte.py#L242-L253
Awesome, thank you.
Is it possible to use multiple CTEs in one query? E.g: