3 ms·
Recursive common table expressions are indeed very powerful! You can even solve the eight queens problem in them: http://www.andreas-dewes.de/en/2015/queens-of
by ThePhysicist 11y ago
Recursive common table expressions are indeed very powerful! You can even solve the eight queens problem in them:
http://www.andreas-dewes.de/en/2015/queens-of-the-data-age-abusing-common-table-expressions-to-solve-the-eight-queens-problem-in-sql/ http://www.andreas-dewes.de/en/2015/queens-of-the-data-age-a...
As others have pointed out there is a really nice section on CTEs in the SQLite documenation as well:
https://www.sqlite.org/lang_with.html https://www.sqlite.org/lang_with.html
- mjn 11y agoWith these features that have been added to SQL over the past decades, you could probably at this point implement Datalog in it, or a Datalog-to-SQL translator. Might be an interesting experiment.